Running different servlet apps with NetBeans 16

2023-02-23 Thread Thad Humphries
I am trying to run and debug my webapps with NetBeans 16 and Tomcat 9.0.65
(I am running OpenJDK 11 but targeting JDK 8 on macOS 10.15). Things are
working, but I think there should be a better way.

I have a directory ./nbdev with three subdirectories: appA, appB, and
apache-tomcat-9.0.65. Tomcat is installed under Services->Servers with
debug port 11550. When I run or debug either app, the context.xml files
do not copy to apache-tomcat-9.0.65/conf/Catalina/localhost. I cannot run
my app until I copy the context file there myself and add the docBase to
the Context of each file (as
in docBase="/Users/thad/nbdev/appA/target/appA##1.0.6").

When I run the first app create (appA), the context file I copied remains
at apache-tomcat-9.0.67/conf/Catalina/localhost/appA.xml
However when stop Tomcat and run appB, its context is deleted and must be
recopied.

I cannot see any difference in their Project Properties (other than
General).

This occurs on both my home and office Macs.

-- 
"Hell hath no limits, nor is circumscrib'd In one self-place; but where we
are is hell, And where hell is, there must we ever be" --Christopher
Marlowe, *Doctor Faustus* (v. 111-13)


Re: [servlet]

2023-01-21 Thread Eric Bresie
Regarding "compile error that complains about that RequestDispatcher is an
undefined symbol.  "

When editing, are red issue icons in the Netbeans gutter on the left on
some of the imports?  This can show missing dependencies in your pom file.

May need to add the javax-servlet-api dependency.

Eric Bresie
ebre...@gmail.com


On Fri, Jan 20, 2023 at 5:33 PM Peter Scharf 
wrote:

> Now the next step in this tutorial passes the values of variables in the
> java web form to a jsp file instead of embedding them in println commands.
> Here is the code that the tutorial (
> https://www.youtube.com/watch?v=eP9oz6ZKUXM at Creat JavaServer Page
> (JSP), about 23 minutes into it) gives:
>
> protected void doPost(HttpServletRequest request, HttpServletResponse
> response)
>throws ServletException, IOException {
>   processRequest(request, response);
>   float miles = Float.parseFloat(request.getParameter("miles"));
>   float kilometers = miles * 1.61f;
>   request.setAttribute("miles", miles);
>   request.setAttribute("kilometers", kilometers);
>   String resultPage = "result.jsp";
>
>   RequestDispatcher dispatcher =
> request.getRequestDispatcher(resultPage);
>   dispacther.forward(request, response);
>}
>
> I get a compile error that complains about that RequestDispatcher is an
> undefined symbol.  After much hunting on websites for answers, I revised
> the code as in the project in the git:
> https://github.com/the-sanskrit-library/public.git, namely:
>
>protected void doPost(HttpServletRequest request, HttpServletResponse
> response)
>throws ServletException, IOException {
>   float miles = Float.parseFloat(request.getParameter("miles"));
>   float kilometers = miles * 1.61f;
>   request.setAttribute("miles", miles);
>   request.setAttribute("kilometers", kilometers);
>   String resultPage = "result.jsp";
>   request.getRequestDispatcher(resultPage).forward(request, response);
>}
>
> Which compiles.  However, the response I get give the string rather than
> their values:
>
> Unit Conversion Result
>
> *$(miles) miles = $(kilometers) kilometers*
> Any suggestions?
> Yours,
> Peter
>
> **
> Peter M. Scharf, President
> The Sanskrit Library
> sch...@sanskritlibrary.org
> https://sanskritlibrary.org
> **
>
> On Jan 20, 2023, at 12:31 PM, Carl Mosca  wrote:
>
> You're welcome Peter and glad to hear it.  You can remove/replace the root
> app if/as needed.
>
> Regards,
> Carl
>
> On Fri, Jan 20, 2023 at 1:28 PM Peter Scharf 
> wrote:
>
>> Dear Carl,
>> Thanks for your help.  I installed Tomcat version 9.  Now the project
>> runs correctly.
>> Changing the context path to “/” however, interfered with the “It works”
>> root app of Tomcat, so I changed it back.  I get the correct result of the
>> conversion servlet at the path
>> http://localhost:8080/mavenproject3/convert.
>> Yours,
>> Peter
>>
>> **
>> Peter M. Scharf, President
>> The Sanskrit Library
>> sch...@sanskritlibrary.org
>> https://sanskritlibrary.org
>> **
>>
>> On Jan 18, 2023, at 8:16 PM, Carl Mosca  wrote:
>>
>> Hi Peter,
>>
>> First off it looks like the example notes suggest using Tomcat 9 or
>> earlier so I used 9.0.71.
>>
>> I changed the context path (in the context.xml file): .
>>
>> It's worth looking at creating a .gitignore file so that class and other
>> binaries are not in git as they are not needed.
>>
>> Regards,
>> Carl
>>
>> On Wed, Jan 18, 2023 at 6:16 PM Peter Scharf 
>> wrote:
>>
>>> The catalina log has lots of info entries.  Here’s one WARNING:
>>>
>>> 18-Jan-2023 12:10:12.964 WARNING [main]
>>> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute
>>> with value [/mavenproject3] in deployment descriptor
>>> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml]
>>> has been ignored
>>>
>>> The catalina.out file has the same suspicious entry:
>>>
>>> 18-Jan-2023 12:10:12.964 WARNING [main]
>>> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute
>>> with value [/mavenproject3] in deployment descriptor
>>> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml]
>>> has been ignored
>>>
>>> The localhost_acc

Re: [servlet]

2023-01-21 Thread Carl Mosca
Progress. Excellent.


On Sat, Jan 21, 2023 at 5:36 PM Peter Scharf 
wrote:

> Now I see that this also works:
>
> ${miles} miles = ${kilometers} kilometers
>
> I had put round braces instead of curly braces which caused the previous
> error.
>
> **
> Peter M. Scharf, President
> The Sanskrit Library
> sch...@sanskritlibrary.org
> https://sanskritlibrary.org
> **
>
> On Jan 21, 2023, at 7:12 AM, Carl Mosca  wrote:
>
> That should actually be a getAttribute to get the values you set - the
> parameter is what was passed to it but I am guessing you knew that.
>
> On Sat, Jan 21, 2023 at 8:03 AM Carl Mosca  wrote:
>
>> Good morning Peter,
>>
>> First off I have to apologize because I had not looked at your changes.
>> Given what I think you're trying to do at this point, you're not far off.
>>
>> You might do something like this to get the value of the miles for
>> example:
>>
>> <%= request.getParameter("miles")%>
>>
>> This will ultimately be a bit verbose and a bit harder to maintain than
>> other approaches so you might see beans used more if I understand where
>> you're going.
>>
>> If this makes sense conceptually, you might consider some of the slightly
>> newer approaches such as Spring Boot or Quarkus but that's just one
>> opinion.  Such development stacks are a bit more opinionated but there's
>> some flexibility in both of them as well.
>>
>> I have looked at software development as both an art and a science and I
>> certainly respect the wide variety of preferences and approaches I
>> have encountered over the years.
>>
>> The offer to chat stands.
>>
>> Regards,
>> Carl
>>
>> On Fri, Jan 20, 2023 at 10:17 PM Peter Scharf 
>> wrote:
>>
>>> Dear Carl,
>>> Thanks for your offer.  Actually, my ultimate goal in doing the tutorial
>>> I have accomplished: to create a war file and be able to deploy it using
>>> the Tomcat manager.  This is what I need to do to recreate my website
>>> server which was written a decade ago by an accomplished programmer who is
>>> no longer working for my organization.
>>> My narrower goal was to complete the tutorial, or to see how to do my
>>> the most modern and efficient methods what the tutorial was seeking to
>>> teach: pass information from a form to a program.
>>> I’m on central time and could meet you any afternoon that would be
>>> convenient for you.  I could set up a Zoom meeting or Google Meet.
>>> Yours,
>>> Peter
>>>
>>> ******
>>> Peter M. Scharf, President
>>> The Sanskrit Library
>>> sch...@sanskritlibrary.org
>>> https://sanskritlibrary.org
>>> **
>>>
>>> On Jan 20, 2023, at 5:42 PM, Carl Mosca  wrote:
>>>
>>> Hi Peter,
>>>
>>> I don't have the code handy but it sounds like the tutorial (which
>>> admittedly I have not viewed) is not making clear the relationship between
>>> the servlet reference to the variable which is in the html form if I am
>>> recalling correctly.  (I used the NetBeans debugger to ensure that the
>>> value was present as expected in the code I ran.)
>>>
>>> I am wondering if walking through the code for 10-20 minutes would be
>>> more helpful.  Just a thought.  I am willing to do that if you like.  I am
>>> in the eastern time zone (Richmond, VA).
>>>
>>> Alternatively if you don't get an answer from the list, I will try to
>>> make some time to document this example.
>>>
>>> Having said all that, what is your ultimate goal?  This particular
>>> example represents a much older approach which is certainly workable but
>>> there are newer approaches which are more efficient in the long run.
>>>
>>> Happy to discuss.
>>>
>>> Regards,
>>> Carl
>>>
>>>
>>>
>>> On Fri, Jan 20, 2023 at 6:33 PM Peter Scharf 
>>> wrote:
>>>
>>>> Now the next step in this tutorial passes the values of variables in
>>>> the java web form to a jsp file instead of embedding them in println
>>>> commands.  Here is the code that the tutorial (
>>>> https://www.youtube.com/watch?v=eP9oz6ZKUXM at Creat JavaServer Page
>>>> (JSP), about 23 minutes into it) gives:
>>>>
>>>> protected void doPost(HttpServletRequest request, HttpServletResponse
>>>>

Re: [servlet]

2023-01-21 Thread Peter Scharf
Now I see that this also works:

${miles} miles = ${kilometers} kilometers

I had put round braces instead of curly braces which caused the previous error.

**
Peter M. Scharf, President
The Sanskrit Library
sch...@sanskritlibrary.org
https://sanskritlibrary.org
**

> On Jan 21, 2023, at 7:12 AM, Carl Mosca  wrote:
> 
> That should actually be a getAttribute to get the values you set - the 
> parameter is what was passed to it but I am guessing you knew that.
> 
> On Sat, Jan 21, 2023 at 8:03 AM Carl Mosca  <mailto:carljmo...@gmail.com>> wrote:
>> Good morning Peter,
>> 
>> First off I have to apologize because I had not looked at your changes.  
>> Given what I think you're trying to do at this point, you're not far off.
>> 
>> You might do something like this to get the value of the miles for example:
>> 
>> <%= request.getParameter("miles")%>
>> 
>> This will ultimately be a bit verbose and a bit harder to maintain than 
>> other approaches so you might see beans used more if I understand where 
>> you're going.
>> 
>> If this makes sense conceptually, you might consider some of the slightly 
>> newer approaches such as Spring Boot or Quarkus but that's just one opinion. 
>>  Such development stacks are a bit more opinionated but there's some 
>> flexibility in both of them as well.
>> 
>> I have looked at software development as both an art and a science and I 
>> certainly respect the wide variety of preferences and approaches I have 
>> encountered over the years.
>> 
>> The offer to chat stands.
>> 
>> Regards,
>> Carl
>> 
>> On Fri, Jan 20, 2023 at 10:17 PM Peter Scharf > <mailto:sch...@sanskritlibrary.org>> wrote:
>>> Dear Carl,
>>> Thanks for your offer.  Actually, my ultimate goal in doing the 
>>> tutorial I have accomplished: to create a war file and be able to deploy it 
>>> using the Tomcat manager.  This is what I need to do to recreate my website 
>>> server which was written a decade ago by an accomplished programmer who is 
>>> no longer working for my organization.
>>> My narrower goal was to complete the tutorial, or to see how to do my 
>>> the most modern and efficient methods what the tutorial was seeking to 
>>> teach: pass information from a form to a program.
>>> I’m on central time and could meet you any afternoon that would be 
>>> convenient for you.  I could set up a Zoom meeting or Google Meet.
>>> Yours,
>>> Peter
>>> 
>>> **
>>> Peter M. Scharf, President
>>> The Sanskrit Library
>>> sch...@sanskritlibrary.org <mailto:sch...@sanskritlibrary.org>
>>> https://sanskritlibrary.org <https://sanskritlibrary.org/>
>>> **
>>> 
>>>> On Jan 20, 2023, at 5:42 PM, Carl Mosca >>> <mailto:carljmo...@gmail.com>> wrote:
>>>> 
>>>> Hi Peter,
>>>> 
>>>> I don't have the code handy but it sounds like the tutorial (which 
>>>> admittedly I have not viewed) is not making clear the relationship between 
>>>> the servlet reference to the variable which is in the html form if I am 
>>>> recalling correctly.  (I used the NetBeans debugger to ensure that the 
>>>> value was present as expected in the code I ran.)
>>>> 
>>>> I am wondering if walking through the code for 10-20 minutes would be more 
>>>> helpful.  Just a thought.  I am willing to do that if you like.  I am in 
>>>> the eastern time zone (Richmond, VA).
>>>> 
>>>> Alternatively if you don't get an answer from the list, I will try to make 
>>>> some time to document this example.
>>>> 
>>>> Having said all that, what is your ultimate goal?  This particular example 
>>>> represents a much older approach which is certainly workable but there are 
>>>> newer approaches which are more efficient in the long run.
>>>> 
>>>> Happy to discuss.
>>>> 
>>>> Regards,
>>>> Carl
>>>> 
>>>> 
>>>> 
>>>> On Fri, Jan 20, 2023 at 6:33 PM Peter Scharf >>> <mailto:sch...@sanskritlibrary.org>> wrote:
>>>>> Now the next step in this tutorial passes the values of variables in the 
>>>>> java web form to a jsp file instead of embedding them in println 
>>>>> commands.  Here is 

Re: [servlet]

2023-01-21 Thread Peter Scharf
Thanks, Carl!  I put

<%=request.getAttribute("miles")%>
and
<%=request.getAttribute("kilometers")%>
in place of $(miles) and $(kilometers) in result.jsp and it works as desired.
Yours,
Peter

**
Peter M. Scharf, President
The Sanskrit Library
sch...@sanskritlibrary.org
https://sanskritlibrary.org
**

> On Jan 21, 2023, at 7:12 AM, Carl Mosca  wrote:
> 
> That should actually be a getAttribute to get the values you set - the 
> parameter is what was passed to it but I am guessing you knew that.
> 
> On Sat, Jan 21, 2023 at 8:03 AM Carl Mosca  <mailto:carljmo...@gmail.com>> wrote:
>> Good morning Peter,
>> 
>> First off I have to apologize because I had not looked at your changes.  
>> Given what I think you're trying to do at this point, you're not far off.
>> 
>> You might do something like this to get the value of the miles for example:
>> 
>> <%= request.getParameter("miles")%>
>> 
>> This will ultimately be a bit verbose and a bit harder to maintain than 
>> other approaches so you might see beans used more if I understand where 
>> you're going.
>> 
>> If this makes sense conceptually, you might consider some of the slightly 
>> newer approaches such as Spring Boot or Quarkus but that's just one opinion. 
>>  Such development stacks are a bit more opinionated but there's some 
>> flexibility in both of them as well.
>> 
>> I have looked at software development as both an art and a science and I 
>> certainly respect the wide variety of preferences and approaches I have 
>> encountered over the years.
>> 
>> The offer to chat stands.
>> 
>> Regards,
>> Carl
>> 
>> On Fri, Jan 20, 2023 at 10:17 PM Peter Scharf > <mailto:sch...@sanskritlibrary.org>> wrote:
>>> Dear Carl,
>>> Thanks for your offer.  Actually, my ultimate goal in doing the 
>>> tutorial I have accomplished: to create a war file and be able to deploy it 
>>> using the Tomcat manager.  This is what I need to do to recreate my website 
>>> server which was written a decade ago by an accomplished programmer who is 
>>> no longer working for my organization.
>>> My narrower goal was to complete the tutorial, or to see how to do my 
>>> the most modern and efficient methods what the tutorial was seeking to 
>>> teach: pass information from a form to a program.
>>> I’m on central time and could meet you any afternoon that would be 
>>> convenient for you.  I could set up a Zoom meeting or Google Meet.
>>> Yours,
>>> Peter
>>> 
>>> **
>>> Peter M. Scharf, President
>>> The Sanskrit Library
>>> sch...@sanskritlibrary.org <mailto:sch...@sanskritlibrary.org>
>>> https://sanskritlibrary.org <https://sanskritlibrary.org/>
>>> **
>>> 
>>>> On Jan 20, 2023, at 5:42 PM, Carl Mosca >>> <mailto:carljmo...@gmail.com>> wrote:
>>>> 
>>>> Hi Peter,
>>>> 
>>>> I don't have the code handy but it sounds like the tutorial (which 
>>>> admittedly I have not viewed) is not making clear the relationship between 
>>>> the servlet reference to the variable which is in the html form if I am 
>>>> recalling correctly.  (I used the NetBeans debugger to ensure that the 
>>>> value was present as expected in the code I ran.)
>>>> 
>>>> I am wondering if walking through the code for 10-20 minutes would be more 
>>>> helpful.  Just a thought.  I am willing to do that if you like.  I am in 
>>>> the eastern time zone (Richmond, VA).
>>>> 
>>>> Alternatively if you don't get an answer from the list, I will try to make 
>>>> some time to document this example.
>>>> 
>>>> Having said all that, what is your ultimate goal?  This particular example 
>>>> represents a much older approach which is certainly workable but there are 
>>>> newer approaches which are more efficient in the long run.
>>>> 
>>>> Happy to discuss.
>>>> 
>>>> Regards,
>>>> Carl
>>>> 
>>>> 
>>>> 
>>>> On Fri, Jan 20, 2023 at 6:33 PM Peter Scharf >>> <mailto:sch...@sanskritlibrary.org>> wrote:
>>>>> Now the next step in this tutorial passes the values of variables in the 
>>>>> java web form to a jsp file instead of embedding them

Re: [servlet]

2023-01-20 Thread Peter Scharf
Now the next step in this tutorial passes the values of variables in the java 
web form to a jsp file instead of embedding them in println commands.  Here is 
the code that the tutorial (https://www.youtube.com/watch?v=eP9oz6ZKUXM at 
Creat JavaServer Page (JSP), about 23 minutes into it) gives:

protected void doPost(HttpServletRequest request, HttpServletResponse response)
   throws ServletException, IOException {
  processRequest(request, response);
  float miles = Float.parseFloat(request.getParameter("miles"));
  float kilometers = miles * 1.61f;
  request.setAttribute("miles", miles);
  request.setAttribute("kilometers", kilometers);
  String resultPage = "result.jsp";
  
  RequestDispatcher dispatcher = request.getRequestDispatcher(resultPage);
  dispacther.forward(request, response);
   }

I get a compile error that complains about that RequestDispatcher is an 
undefined symbol.  After much hunting on websites for answers, I revised the 
code as in the project in the git: 
https://github.com/the-sanskrit-library/public.git, namely:

   protected void doPost(HttpServletRequest request, HttpServletResponse 
response)
   throws ServletException, IOException {
  float miles = Float.parseFloat(request.getParameter("miles"));
  float kilometers = miles * 1.61f;
  request.setAttribute("miles", miles);
  request.setAttribute("kilometers", kilometers);
  String resultPage = "result.jsp";
  request.getRequestDispatcher(resultPage).forward(request, response);
   }
 
Which compiles.  However, the response I get give the string rather than their 
values:

Unit Conversion Result

$(miles) miles = $(kilometers) kilometers

Any suggestions?
Yours,
Peter

**
Peter M. Scharf, President
The Sanskrit Library
sch...@sanskritlibrary.org
https://sanskritlibrary.org
**

> On Jan 20, 2023, at 12:31 PM, Carl Mosca  wrote:
> 
> You're welcome Peter and glad to hear it.  You can remove/replace the root 
> app if/as needed.
> 
> Regards,
> Carl
> 
> On Fri, Jan 20, 2023 at 1:28 PM Peter Scharf  <mailto:sch...@sanskritlibrary.org>> wrote:
>> Dear Carl,
>>  Thanks for your help.  I installed Tomcat version 9.  Now the project 
>> runs correctly.
>>  Changing the context path to “/” however, interfered with the “It 
>> works” root app of Tomcat, so I changed it back.  I get the correct result 
>> of the conversion servlet at the path 
>> http://localhost:8080/mavenproject3/convert.
>>  Yours,
>>  Peter
>> 
>> **
>> Peter M. Scharf, President
>> The Sanskrit Library
>> sch...@sanskritlibrary.org <mailto:sch...@sanskritlibrary.org>
>> https://sanskritlibrary.org <https://sanskritlibrary.org/>
>> **
>> 
>>> On Jan 18, 2023, at 8:16 PM, Carl Mosca >> <mailto:carljmo...@gmail.com>> wrote:
>>> 
>>> Hi Peter,
>>> 
>>> First off it looks like the example notes suggest using Tomcat 9 or earlier 
>>> so I used 9.0.71.
>>> 
>>> I changed the context path (in the context.xml file): .
>>> 
>>> It's worth looking at creating a .gitignore file so that class and other 
>>> binaries are not in git as they are not needed.
>>> 
>>> Regards,
>>> Carl
>>> 
>>> On Wed, Jan 18, 2023 at 6:16 PM Peter Scharf >> <mailto:sch...@sanskritlibrary.org>> wrote:
>>>> The catalina log has lots of info entries.  Here’s one WARNING:
>>>> 
>>>> 18-Jan-2023 12:10:12.964 WARNING [main] 
>>>> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute 
>>>> with value [/mavenproject3] in deployment descriptor 
>>>> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml]
>>>>  has been ignored
>>>> 
>>>> The catalina.out file has the same suspicious entry:
>>>> 
>>>> 18-Jan-2023 12:10:12.964 WARNING [main] 
>>>> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute 
>>>> with value [/mavenproject3] in deployment descriptor 
>>>> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml]
>>>>  has been ignored
>>>> 
>>>> The localhost_access_log.2023-01-18.txt file has:
>>>> 
>>>> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:12:10:18 -0600] "GET /convert HTTP/1.1" 
>>>> 404 759
>>>> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:12:10:18 -0600] "GET /favicon.

Re: [servlet]

2023-01-20 Thread Eric Bresie
By the way, I believe these warnings are due to conflicting configuration
methods.  Can configure them in the descriptor or with  annotations which I
believe may take preference.  Maybe there were some conflicting
configurations in use and/or limiting the wrong place to correct.

Glad it works now.

Eric B

On Wed, Jan 18, 2023 at 5:16 PM Peter Scharf 
wrote:

> The catalina log has lots of info entries.  Here’s one WARNING:
>
> 18-Jan-2023 12:10:12.964 WARNING [main]
> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute
> with value [/mavenproject3] in deployment descriptor
> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml]
> has been ignored
>
> The catalina.out file has the same suspicious entry:
>
> 18-Jan-2023 12:10:12.964 WARNING [main]
> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute
> with value [/mavenproject3] in deployment descriptor
> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml]
> has been ignored
>
> The localhost_access_log.2023-01-18.txt file has:
>
> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:12:10:18 -0600] "GET /convert HTTP/1.1"
> 404 759
> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:12:10:18 -0600] "GET /favicon.ico
> HTTP/1.1" 200 21630
> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:16:50:07 -0600] "GET /mavenproject3/
> HTTP/1.1" 200 453
> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:16:50:14 -0600] "POST
> /mavenproject3/convert HTTP/1.1" 404 777
> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:16:51:11 -0600] "POST
> /mavenproject3/convert HTTP/1.1" 404 777
>
> Regarding Java EE versus Jakarta EE, a quick search shows that none of my
> project files contain ‘jakarta’ while the following all contain ‘java’
>
> UnitConverterServlet.class
> UnitConverterServlet.class
> UnitConverterServlet.java
> inputFiles.lst
> javaee-endorsed-api-7.0.jar
> pom.xml
>
>
>
> **
> Peter M. Scharf, President
> The Sanskrit Library
> sch...@sanskritlibrary.org
> https://sanskritlibrary.org
> **
>
> On Jan 18, 2023, at 12:19 PM, Eric Bresie  wrote:
>
> Does anything show up in tomcat log?
>
> I seem to recall there is some migration going on to move namespace from
> Java EE to jakarta EE name space.  Not sure if maybe that is coming into
> play here.  This might help if it is impacted
>
> https://github.com/apache/tomcat-jakartaee-migration
>
>
>
> On Wed, Jan 18, 2023 at 12:11 PM Peter Scharf 
> wrote:
>
>> Thanks, Eric.  I had tried that.  I get the message:
>>
>> HTTP Status 404 – Not Found
>> --
>>
>> *Type* Status Report
>>
>> *Message* The requested resource [/convert] is not available
>>
>> *Description* The origin server did not find a current representation
>> for the target resource or is not willing to disclose that one exists.
>> ------
>> Apache Tomcat/10.0.23
>>
>> **
>> Peter M. Scharf, President
>> The Sanskrit Library
>> sch...@sanskritlibrary.org
>> https://sanskritlibrary.org
>> **
>>
>> On Jan 18, 2023, at 12:06 PM, Eric Bresie  wrote:
>>
>>
>> Servlet says the urlpattern is “/convert”
>>
>> Try
>> http://localhost:8080/convert
>>
>>
>> On Wed, Jan 18, 2023 at 11:51 AM Peter Scharf 
>> wrote:
>>
>>> Yes, the URL is correct:
>>> https://github.com/the-sanskrit-library/public.git
>>> The git directory hierarchy deceived me: I had the code outside the git
>>> directory.  I have now moved it into the git directory.
>>> Forgive me; I’m not very familiar with git and am using the desktop
>>> version.
>>> Yours,
>>> Peter
>>>
>>> **
>>> Peter M. Scharf, President
>>> The Sanskrit Library
>>> sch...@sanskritlibrary.org
>>> https://sanskritlibrary.org
>>> **
>>>
>>> On Jan 18, 2023, at 5:35 AM, Carl Mosca  wrote:
>>>
>>> Hi Peter,
>>>
>>> Can you confirm that url please.  I am not seeing Java code there; only
>>> a README and attribute file.
>>>
>>> Regards,
>>> Carl
>>>
>>>
>>> On Tue, Jan 17, 2023 at 10:40 PM Peter Scharf <
>>> sch...@sanskritlibrary.org> wrote:
>>>
>>>> Thank you for suggesting to put the project on Github.  I have now
>>>> created a public repository at the followin

Re: [servlet]

2023-01-20 Thread Carl Mosca
You're welcome Peter and glad to hear it.  You can remove/replace the root
app if/as needed.

Regards,
Carl

On Fri, Jan 20, 2023 at 1:28 PM Peter Scharf 
wrote:

> Dear Carl,
> Thanks for your help.  I installed Tomcat version 9.  Now the project runs
> correctly.
> Changing the context path to “/” however, interfered with the “It works”
> root app of Tomcat, so I changed it back.  I get the correct result of the
> conversion servlet at the path http://localhost:8080/mavenproject3/convert
> .
> Yours,
> Peter
>
> **
> Peter M. Scharf, President
> The Sanskrit Library
> sch...@sanskritlibrary.org
> https://sanskritlibrary.org
> **
>
> On Jan 18, 2023, at 8:16 PM, Carl Mosca  wrote:
>
> Hi Peter,
>
> First off it looks like the example notes suggest using Tomcat 9 or
> earlier so I used 9.0.71.
>
> I changed the context path (in the context.xml file): .
>
> It's worth looking at creating a .gitignore file so that class and other
> binaries are not in git as they are not needed.
>
> Regards,
> Carl
>
> On Wed, Jan 18, 2023 at 6:16 PM Peter Scharf 
> wrote:
>
>> The catalina log has lots of info entries.  Here’s one WARNING:
>>
>> 18-Jan-2023 12:10:12.964 WARNING [main]
>> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute
>> with value [/mavenproject3] in deployment descriptor
>> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml]
>> has been ignored
>>
>> The catalina.out file has the same suspicious entry:
>>
>> 18-Jan-2023 12:10:12.964 WARNING [main]
>> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute
>> with value [/mavenproject3] in deployment descriptor
>> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml]
>> has been ignored
>>
>> The localhost_access_log.2023-01-18.txt file has:
>>
>> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:12:10:18 -0600] "GET /convert HTTP/1.1"
>> 404 759
>> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:12:10:18 -0600] "GET /favicon.ico
>> HTTP/1.1" 200 21630
>> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:16:50:07 -0600] "GET /mavenproject3/
>> HTTP/1.1" 200 453
>> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:16:50:14 -0600] "POST
>> /mavenproject3/convert HTTP/1.1" 404 777
>> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:16:51:11 -0600] "POST
>> /mavenproject3/convert HTTP/1.1" 404 777
>>
>> Regarding Java EE versus Jakarta EE, a quick search shows that none of my
>> project files contain ‘jakarta’ while the following all contain ‘java’
>>
>> UnitConverterServlet.class
>> UnitConverterServlet.class
>> UnitConverterServlet.java
>> inputFiles.lst
>> javaee-endorsed-api-7.0.jar
>> pom.xml
>>
>>
>>
>> **
>> Peter M. Scharf, President
>> The Sanskrit Library
>> sch...@sanskritlibrary.org
>> https://sanskritlibrary.org
>> **
>>
>> On Jan 18, 2023, at 12:19 PM, Eric Bresie  wrote:
>>
>> Does anything show up in tomcat log?
>>
>> I seem to recall there is some migration going on to move namespace from
>> Java EE to jakarta EE name space.  Not sure if maybe that is coming into
>> play here.  This might help if it is impacted
>>
>> https://github.com/apache/tomcat-jakartaee-migration
>>
>>
>>
>> On Wed, Jan 18, 2023 at 12:11 PM Peter Scharf 
>> wrote:
>>
>>> Thanks, Eric.  I had tried that.  I get the message:
>>>
>>> HTTP Status 404 – Not Found
>>> --
>>>
>>> *Type* Status Report
>>>
>>> *Message* The requested resource [/convert] is not available
>>>
>>> *Description* The origin server did not find a current representation
>>> for the target resource or is not willing to disclose that one exists.
>>> --
>>> Apache Tomcat/10.0.23
>>>
>>> **
>>> Peter M. Scharf, President
>>> The Sanskrit Library
>>> sch...@sanskritlibrary.org
>>> https://sanskritlibrary.org
>>> **
>>>
>>> On Jan 18, 2023, at 12:06 PM, Eric Bresie  wrote:
>>>
>>>
>>> Servlet says the urlpattern is “/convert”
>>>
>>> Try
>>> http://localhost:8080/convert
>>>
>>>
>>> On Wed, Jan 18, 2023 at 11:51 AM Peter Scharf <
>>> sch...@sanskritlibrary.org> w

Re: [servlet]

2023-01-20 Thread Peter Scharf
Dear Carl,
Thanks for your help.  I installed Tomcat version 9.  Now the project 
runs correctly.
Changing the context path to “/” however, interfered with the “It 
works” root app of Tomcat, so I changed it back.  I get the correct result of 
the conversion servlet at the path http://localhost:8080/mavenproject3/convert.
Yours,
Peter

**
Peter M. Scharf, President
The Sanskrit Library
sch...@sanskritlibrary.org
https://sanskritlibrary.org
**

> On Jan 18, 2023, at 8:16 PM, Carl Mosca  wrote:
> 
> Hi Peter,
> 
> First off it looks like the example notes suggest using Tomcat 9 or earlier 
> so I used 9.0.71.
> 
> I changed the context path (in the context.xml file): .
> 
> It's worth looking at creating a .gitignore file so that class and other 
> binaries are not in git as they are not needed.
> 
> Regards,
> Carl
> 
> On Wed, Jan 18, 2023 at 6:16 PM Peter Scharf  <mailto:sch...@sanskritlibrary.org>> wrote:
>> The catalina log has lots of info entries.  Here’s one WARNING:
>> 
>> 18-Jan-2023 12:10:12.964 WARNING [main] 
>> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute 
>> with value [/mavenproject3] in deployment descriptor 
>> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml] 
>> has been ignored
>> 
>> The catalina.out file has the same suspicious entry:
>> 
>> 18-Jan-2023 12:10:12.964 WARNING [main] 
>> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute 
>> with value [/mavenproject3] in deployment descriptor 
>> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml] 
>> has been ignored
>> 
>> The localhost_access_log.2023-01-18.txt file has:
>> 
>> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:12:10:18 -0600] "GET /convert HTTP/1.1" 404 
>> 759
>> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:12:10:18 -0600] "GET /favicon.ico HTTP/1.1" 
>> 200 21630
>> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:16:50:07 -0600] "GET /mavenproject3/ 
>> HTTP/1.1" 200 453
>> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:16:50:14 -0600] "POST 
>> /mavenproject3/convert HTTP/1.1" 404 777
>> 0:0:0:0:0:0:0:1 - - [18/Jan/2023:16:51:11 -0600] "POST 
>> /mavenproject3/convert HTTP/1.1" 404 777
>> 
>> Regarding Java EE versus Jakarta EE, a quick search shows that none of my 
>> project files contain ‘jakarta’ while the following all contain ‘java’
>> 
>> UnitConverterServlet.class
>> UnitConverterServlet.class
>> UnitConverterServlet.java
>> inputFiles.lst
>> javaee-endorsed-api-7.0.jar
>> pom.xml
>> 
>> 
>> 
>> **
>> Peter M. Scharf, President
>> The Sanskrit Library
>> sch...@sanskritlibrary.org <mailto:sch...@sanskritlibrary.org>
>> https://sanskritlibrary.org <https://sanskritlibrary.org/>
>> **
>> 
>>> On Jan 18, 2023, at 12:19 PM, Eric Bresie >> <mailto:ebre...@gmail.com>> wrote:
>>> 
>>> Does anything show up in tomcat log?
>>> 
>>> I seem to recall there is some migration going on to move namespace from 
>>> Java EE to jakarta EE name space.  Not sure if maybe that is coming into 
>>> play here.  This might help if it is impacted
>>> 
>>> https://github.com/apache/tomcat-jakartaee-migration
>>> 
>>> 
>>> 
>>> On Wed, Jan 18, 2023 at 12:11 PM Peter Scharf >> <mailto:sch...@sanskritlibrary.org>> wrote:
>>>> Thanks, Eric.  I had tried that.  I get the message:
>>>> 
>>>> HTTP Status 404 – Not Found
>>>> 
>>>> Type Status Report
>>>> 
>>>> Message The requested resource [/convert] is not available
>>>> 
>>>> Description The origin server did not find a current representation for 
>>>> the target resource or is not willing to disclose that one exists.
>>>> 
>>>> Apache Tomcat/10.0.23
>>>> 
>>>> 
>>>> **
>>>> Peter M. Scharf, President
>>>> The Sanskrit Library
>>>> sch...@sanskritlibrary.org <mailto:sch...@sanskritlibrary.org>
>>>> https://sanskritlibrary.org <https://sanskritlibrary.org/>
>>>> **
>>>> 
>>>>> On Jan 18, 2023, at 12:06 PM, Eric Bresie >>>> <mailto:ebre...@gmail.com>> wrote:
>>>>> 
>>>>> 
>&

Re: [servlet]

2023-01-18 Thread Peter Scharf
The catalina log has lots of info entries.  Here’s one WARNING:

18-Jan-2023 12:10:12.964 WARNING [main] 
org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with 
value [/mavenproject3] in deployment descriptor 
[/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml] 
has been ignored

The catalina.out file has the same suspicious entry:

18-Jan-2023 12:10:12.964 WARNING [main] 
org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with 
value [/mavenproject3] in deployment descriptor 
[/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml] 
has been ignored

The localhost_access_log.2023-01-18.txt file has:

0:0:0:0:0:0:0:1 - - [18/Jan/2023:12:10:18 -0600] "GET /convert HTTP/1.1" 404 759
0:0:0:0:0:0:0:1 - - [18/Jan/2023:12:10:18 -0600] "GET /favicon.ico HTTP/1.1" 
200 21630
0:0:0:0:0:0:0:1 - - [18/Jan/2023:16:50:07 -0600] "GET /mavenproject3/ HTTP/1.1" 
200 453
0:0:0:0:0:0:0:1 - - [18/Jan/2023:16:50:14 -0600] "POST /mavenproject3/convert 
HTTP/1.1" 404 777
0:0:0:0:0:0:0:1 - - [18/Jan/2023:16:51:11 -0600] "POST /mavenproject3/convert 
HTTP/1.1" 404 777

Regarding Java EE versus Jakarta EE, a quick search shows that none of my 
project files contain ‘jakarta’ while the following all contain ‘java’

UnitConverterServlet.class
UnitConverterServlet.class
UnitConverterServlet.java
inputFiles.lst
javaee-endorsed-api-7.0.jar
pom.xml



**
Peter M. Scharf, President
The Sanskrit Library
sch...@sanskritlibrary.org
https://sanskritlibrary.org
**

> On Jan 18, 2023, at 12:19 PM, Eric Bresie  wrote:
> 
> Does anything show up in tomcat log?
> 
> I seem to recall there is some migration going on to move namespace from Java 
> EE to jakarta EE name space.  Not sure if maybe that is coming into play 
> here.  This might help if it is impacted
> 
> https://github.com/apache/tomcat-jakartaee-migration
> 
> 
> 
> On Wed, Jan 18, 2023 at 12:11 PM Peter Scharf  <mailto:sch...@sanskritlibrary.org>> wrote:
>> Thanks, Eric.  I had tried that.  I get the message:
>> 
>> HTTP Status 404 – Not Found
>> 
>> Type Status Report
>> 
>> Message The requested resource [/convert] is not available
>> 
>> Description The origin server did not find a current representation for the 
>> target resource or is not willing to disclose that one exists.
>> 
>> Apache Tomcat/10.0.23
>> 
>> 
>> **
>> Peter M. Scharf, President
>> The Sanskrit Library
>> sch...@sanskritlibrary.org <mailto:sch...@sanskritlibrary.org>
>> https://sanskritlibrary.org <https://sanskritlibrary.org/>
>> **
>> 
>>> On Jan 18, 2023, at 12:06 PM, Eric Bresie >> <mailto:ebre...@gmail.com>> wrote:
>>> 
>>> 
>>> Servlet says the urlpattern is “/convert”
>>> 
>>> Try 
>>> http://localhost:8080/convert
>>> 
>>> 
>>> On Wed, Jan 18, 2023 at 11:51 AM Peter Scharf >> <mailto:sch...@sanskritlibrary.org>> wrote:
>>>> Yes, the URL is correct: https://github.com/the-sanskrit-library/public.git
>>>> The git directory hierarchy deceived me: I had the code outside the git 
>>>> directory.  I have now moved it into the git directory.
>>>> Forgive me; I’m not very familiar with git and am using the desktop 
>>>> version.
>>>> Yours,
>>>> Peter
>>>> 
>>>> **
>>>> Peter M. Scharf, President
>>>> The Sanskrit Library
>>>> sch...@sanskritlibrary.org <mailto:sch...@sanskritlibrary.org>
>>>> https://sanskritlibrary.org <https://sanskritlibrary.org/>
>>>> **
>>>> 
>>>>> On Jan 18, 2023, at 5:35 AM, Carl Mosca >>>> <mailto:carljmo...@gmail.com>> wrote:
>>>>> 
>>>>> Hi Peter,
>>>>> 
>>>>> Can you confirm that url please.  I am not seeing Java code there; only a 
>>>>> README and attribute file.
>>>>> 
>>>>> Regards,
>>>>> Carl
>>>> 
>>>>> 
>>>>> On Tue, Jan 17, 2023 at 10:40 PM Peter Scharf >>>> <mailto:sch...@sanskritlibrary.org>> wrote:
>>>>>> Thank you for suggesting to put the project on Github.  I have now 
>>>>>> created a public repository at the following url:
>>>>>> 
>>>>>> https://github.com/the-sanskrit-library/pub

Re: [servlet]

2023-01-18 Thread Peter Scharf
The form opens for me too.  The problem is that when I fill in a number and 
click “Convert to kilometers” I get the 404 Not Found message.

**
Peter M. Scharf, President
The Sanskrit Library
sch...@sanskritlibrary.org
https://sanskritlibrary.org
**

> On Jan 18, 2023, at 12:19 PM, Carl Mosca  wrote:
> 
> It opened (automatically) here for me: http://localhost:8080/mavenproject3/ 
> 
> On Wed, Jan 18, 2023 at 1:11 PM Peter Scharf  <mailto:sch...@sanskritlibrary.org>> wrote:
>> Thanks, Eric.  I had tried that.  I get the message:
>> 
>> HTTP Status 404 – Not Found
>> 
>> Type Status Report
>> 
>> Message The requested resource [/convert] is not available
>> 
>> Description The origin server did not find a current representation for the 
>> target resource or is not willing to disclose that one exists.
>> 
>> Apache Tomcat/10.0.23
>> 
>> 
>> **
>> Peter M. Scharf, President
>> The Sanskrit Library
>> sch...@sanskritlibrary.org <mailto:sch...@sanskritlibrary.org>
>> https://sanskritlibrary.org <https://sanskritlibrary.org/>
>> **
>> 
>>> On Jan 18, 2023, at 12:06 PM, Eric Bresie >> <mailto:ebre...@gmail.com>> wrote:
>>> 
>>> 
>>> Servlet says the urlpattern is “/convert”
>>> 
>>> Try 
>>> http://localhost:8080/convert
>>> 
>>> 
>>> On Wed, Jan 18, 2023 at 11:51 AM Peter Scharf >> <mailto:sch...@sanskritlibrary.org>> wrote:
>>>> Yes, the URL is correct: https://github.com/the-sanskrit-library/public.git
>>>> The git directory hierarchy deceived me: I had the code outside the git 
>>>> directory.  I have now moved it into the git directory.
>>>> Forgive me; I’m not very familiar with git and am using the desktop 
>>>> version.
>>>> Yours,
>>>> Peter
>>>> 
>>>> **
>>>> Peter M. Scharf, President
>>>> The Sanskrit Library
>>>> sch...@sanskritlibrary.org <mailto:sch...@sanskritlibrary.org>
>>>> https://sanskritlibrary.org <https://sanskritlibrary.org/>
>>>> **
>>>> 
>>>>> On Jan 18, 2023, at 5:35 AM, Carl Mosca >>>> <mailto:carljmo...@gmail.com>> wrote:
>>>>> 
>>>>> Hi Peter,
>>>>> 
>>>>> Can you confirm that url please.  I am not seeing Java code there; only a 
>>>>> README and attribute file.
>>>>> 
>>>>> Regards,
>>>>> Carl
>>>> 
>>>>> 
>>>>> On Tue, Jan 17, 2023 at 10:40 PM Peter Scharf >>>> <mailto:sch...@sanskritlibrary.org>> wrote:
>>>>>> Thank you for suggesting to put the project on Github.  I have now 
>>>>>> created a public repository at the following url:
>>>>>> 
>>>>>> https://github.com/the-sanskrit-library/public.git
>>>>>> 
>>>>>> The project is in the NetBeans directory.
>>>>>> Yours,
>>>>>> Peter
>>>>>> 
>>>>>> **
>>>>>> Peter M. Scharf, President
>>>>>> The Sanskrit Library
>>>>>> sch...@sanskritlibrary.org <mailto:sch...@sanskritlibrary.org>
>>>>>> https://sanskritlibrary.org <https://sanskritlibrary.org/>
>>>>>> **
>>>>>> 
>>>>>>> On Jan 17, 2023, at 2:38 PM, Carl Mosca >>>>>> <mailto:carljmo...@gmail.com>> wrote:
>>>>>>> 
>>>>>>> Hello Peter,
>>>>>>> 
>>>>>>> Is the project that you created somewhere (such as Github) such that 
>>>>>>> folks could take a look at it?
>>>>>>> 
>>>>>>> Regards,
>>>>>>> Carl
>>>>>>> 
>>>>>>> On Mon, Jan 16, 2023 at 11:21 PM Peter Scharf 
>>>>>>> mailto:sch...@sanskritlibrary.org>> wrote:
>>>>>>>> I just installed NetBeans 16 on a MacBook Pro with an M chip:
>>>>>>>> 
>>>>>>>> Product Version: Apache NetBeans IDE 16
>>>>>>>> Java: 19.0.1; OpenJDK 64-Bit Server VM 19.0.1
>>>>>&

Re: [servlet]

2023-01-18 Thread Eric Bresie
Does anything show up in tomcat log?

I seem to recall there is some migration going on to move namespace from
Java EE to jakarta EE name space.  Not sure if maybe that is coming into
play here.  This might help if it is impacted

https://github.com/apache/tomcat-jakartaee-migration



On Wed, Jan 18, 2023 at 12:11 PM Peter Scharf 
wrote:

> Thanks, Eric.  I had tried that.  I get the message:
>
> HTTP Status 404 – Not Found
> --
>
> *Type* Status Report
>
> *Message* The requested resource [/convert] is not available
>
> *Description* The origin server did not find a current representation for
> the target resource or is not willing to disclose that one exists.
> --
> Apache Tomcat/10.0.23
>
> **
> Peter M. Scharf, President
> The Sanskrit Library
> sch...@sanskritlibrary.org
> https://sanskritlibrary.org
> **
>
> On Jan 18, 2023, at 12:06 PM, Eric Bresie  wrote:
>
>
> Servlet says the urlpattern is “/convert”
>
> Try
> http://localhost:8080/convert
>
>
> On Wed, Jan 18, 2023 at 11:51 AM Peter Scharf 
> wrote:
>
>> Yes, the URL is correct:
>> https://github.com/the-sanskrit-library/public.git
>> The git directory hierarchy deceived me: I had the code outside the git
>> directory.  I have now moved it into the git directory.
>> Forgive me; I’m not very familiar with git and am using the desktop
>> version.
>> Yours,
>> Peter
>>
>> **
>> Peter M. Scharf, President
>> The Sanskrit Library
>> sch...@sanskritlibrary.org
>> https://sanskritlibrary.org
>> **
>>
>> On Jan 18, 2023, at 5:35 AM, Carl Mosca  wrote:
>>
>> Hi Peter,
>>
>> Can you confirm that url please.  I am not seeing Java code there; only a
>> README and attribute file.
>>
>> Regards,
>> Carl
>>
>>
>> On Tue, Jan 17, 2023 at 10:40 PM Peter Scharf 
>> wrote:
>>
>>> Thank you for suggesting to put the project on Github.  I have now
>>> created a public repository at the following url:
>>>
>>> https://github.com/the-sanskrit-library/public.git
>>>
>>> The project is in the NetBeans directory.
>>> Yours,
>>> Peter
>>>
>>> **
>>> Peter M. Scharf, President
>>> The Sanskrit Library
>>> sch...@sanskritlibrary.org
>>> https://sanskritlibrary.org
>>> **
>>>
>>> On Jan 17, 2023, at 2:38 PM, Carl Mosca  wrote:
>>>
>>> Hello Peter,
>>>
>>> Is the project that you created somewhere (such as Github) such that
>>> folks could take a look at it?
>>>
>>> Regards,
>>> Carl
>>>
>>> On Mon, Jan 16, 2023 at 11:21 PM Peter Scharf <
>>> sch...@sanskritlibrary.org> wrote:
>>>
>>>> I just installed NetBeans 16 on a MacBook Pro with an M chip:
>>>>
>>>> *Product Version:* Apache NetBeans IDE 16
>>>> *Java:* 19.0.1; OpenJDK 64-Bit Server VM 19.0.1
>>>> *Runtime:* OpenJDK Runtime Environment 19.0.1
>>>> *System:* Mac OS X version 13.0.1 running on aarch64; UTF-8; en_US (nb)
>>>>
>>>> I am trying to create a minimal servlet and war file to use with Tomcat
>>>>
>>>> apache-tomcat-10.0.23
>>>>
>>>> I worked through half of the demo How to create a webapp tutorial at:
>>>> https://www.youtube.com/watch?v=eP9oz6ZKUXM
>>>> which, however, uses NetBeans 12 and other older software than I have
>>>> installed.
>>>> I was able to do the first item successfully with minor adaptations:
>>>> 1. Create a Jave Web project with Maven
>>>> Got build error:
>>>>
>>>> https://stackoverflow.com/questions/66920567/error-injecting-org-apache-maven-plugin-war-warmojo
>>>> Went to: https://maven.apache.org/plugins/
>>>> Answer: manually configuring one of the recent war plug-ins in POM.xml
>>>> Changed 2.3 to 3.3.2
>>>> Then got the form.
>>>> I successfully created the Unit Conversion form which opens in Safari
>>>> (Version 16.1) in tomcat: http://localhost:8080/mavenproject3/
>>>>
>>>> But trying the second—third items:
>>>> 2. Create Java Servlet & JavaServer Page (JSP)
>>>> 3. Run Java Web App on Tomcat inside NetBeans
>>>>
>>>> I got stuck.
>&

Re: [servlet]

2023-01-18 Thread Carl Mosca
It opened (automatically) here for me: http://localhost:8080/mavenproject3/

On Wed, Jan 18, 2023 at 1:11 PM Peter Scharf 
wrote:

> Thanks, Eric.  I had tried that.  I get the message:
>
> HTTP Status 404 – Not Found
> --
>
> *Type* Status Report
>
> *Message* The requested resource [/convert] is not available
>
> *Description* The origin server did not find a current representation for
> the target resource or is not willing to disclose that one exists.
> --
> Apache Tomcat/10.0.23
>
> **
> Peter M. Scharf, President
> The Sanskrit Library
> sch...@sanskritlibrary.org
> https://sanskritlibrary.org
> **
>
> On Jan 18, 2023, at 12:06 PM, Eric Bresie  wrote:
>
>
> Servlet says the urlpattern is “/convert”
>
> Try
> http://localhost:8080/convert
>
>
> On Wed, Jan 18, 2023 at 11:51 AM Peter Scharf 
> wrote:
>
>> Yes, the URL is correct:
>> https://github.com/the-sanskrit-library/public.git
>> The git directory hierarchy deceived me: I had the code outside the git
>> directory.  I have now moved it into the git directory.
>> Forgive me; I’m not very familiar with git and am using the desktop
>> version.
>> Yours,
>> Peter
>>
>> **
>> Peter M. Scharf, President
>> The Sanskrit Library
>> sch...@sanskritlibrary.org
>> https://sanskritlibrary.org
>> **
>>
>> On Jan 18, 2023, at 5:35 AM, Carl Mosca  wrote:
>>
>> Hi Peter,
>>
>> Can you confirm that url please.  I am not seeing Java code there; only a
>> README and attribute file.
>>
>> Regards,
>> Carl
>>
>>
>> On Tue, Jan 17, 2023 at 10:40 PM Peter Scharf 
>> wrote:
>>
>>> Thank you for suggesting to put the project on Github.  I have now
>>> created a public repository at the following url:
>>>
>>> https://github.com/the-sanskrit-library/public.git
>>>
>>> The project is in the NetBeans directory.
>>> Yours,
>>> Peter
>>>
>>> **
>>> Peter M. Scharf, President
>>> The Sanskrit Library
>>> sch...@sanskritlibrary.org
>>> https://sanskritlibrary.org
>>> **
>>>
>>> On Jan 17, 2023, at 2:38 PM, Carl Mosca  wrote:
>>>
>>> Hello Peter,
>>>
>>> Is the project that you created somewhere (such as Github) such that
>>> folks could take a look at it?
>>>
>>> Regards,
>>> Carl
>>>
>>> On Mon, Jan 16, 2023 at 11:21 PM Peter Scharf <
>>> sch...@sanskritlibrary.org> wrote:
>>>
>>>> I just installed NetBeans 16 on a MacBook Pro with an M chip:
>>>>
>>>> *Product Version:* Apache NetBeans IDE 16
>>>> *Java:* 19.0.1; OpenJDK 64-Bit Server VM 19.0.1
>>>> *Runtime:* OpenJDK Runtime Environment 19.0.1
>>>> *System:* Mac OS X version 13.0.1 running on aarch64; UTF-8; en_US (nb)
>>>>
>>>> I am trying to create a minimal servlet and war file to use with Tomcat
>>>>
>>>> apache-tomcat-10.0.23
>>>>
>>>> I worked through half of the demo How to create a webapp tutorial at:
>>>> https://www.youtube.com/watch?v=eP9oz6ZKUXM
>>>> which, however, uses NetBeans 12 and other older software than I have
>>>> installed.
>>>> I was able to do the first item successfully with minor adaptations:
>>>> 1. Create a Jave Web project with Maven
>>>> Got build error:
>>>>
>>>> https://stackoverflow.com/questions/66920567/error-injecting-org-apache-maven-plugin-war-warmojo
>>>> Went to: https://maven.apache.org/plugins/
>>>> Answer: manually configuring one of the recent war plug-ins in POM.xml
>>>> Changed 2.3 to 3.3.2
>>>> Then got the form.
>>>> I successfully created the Unit Conversion form which opens in Safari
>>>> (Version 16.1) in tomcat: http://localhost:8080/mavenproject3/
>>>>
>>>> But trying the second—third items:
>>>> 2. Create Java Servlet & JavaServer Page (JSP)
>>>> 3. Run Java Web App on Tomcat inside NetBeans
>>>>
>>>> I got stuck.
>>>> When I fill in a value in the miles box and click Convert to
>>>> kilometers, Safari gives me a
>>>> HTTP Status 404 – Not Found
>>>> Message The

Re: [servlet]

2023-01-18 Thread Eric Bresie
Servlet says the urlpattern is “/convert”

Try
http://localhost:8080/convert


On Wed, Jan 18, 2023 at 11:51 AM Peter Scharf 
wrote:

> Yes, the URL is correct:
> https://github.com/the-sanskrit-library/public.git
> The git directory hierarchy deceived me: I had the code outside the git
> directory.  I have now moved it into the git directory.
> Forgive me; I’m not very familiar with git and am using the desktop
> version.
> Yours,
> Peter
>
> **
> Peter M. Scharf, President
> The Sanskrit Library
> sch...@sanskritlibrary.org
> https://sanskritlibrary.org
> **
>
> On Jan 18, 2023, at 5:35 AM, Carl Mosca  wrote:
>
> Hi Peter,
>
> Can you confirm that url please.  I am not seeing Java code there; only a
> README and attribute file.
>
> Regards,
> Carl
>
>
> On Tue, Jan 17, 2023 at 10:40 PM Peter Scharf 
> wrote:
>
>> Thank you for suggesting to put the project on Github.  I have now
>> created a public repository at the following url:
>>
>> https://github.com/the-sanskrit-library/public.git
>>
>> The project is in the NetBeans directory.
>> Yours,
>> Peter
>>
>> **
>> Peter M. Scharf, President
>> The Sanskrit Library
>> sch...@sanskritlibrary.org
>> https://sanskritlibrary.org
>> **
>>
>> On Jan 17, 2023, at 2:38 PM, Carl Mosca  wrote:
>>
>> Hello Peter,
>>
>> Is the project that you created somewhere (such as Github) such that
>> folks could take a look at it?
>>
>> Regards,
>> Carl
>>
>> On Mon, Jan 16, 2023 at 11:21 PM Peter Scharf 
>> wrote:
>>
>>> I just installed NetBeans 16 on a MacBook Pro with an M chip:
>>>
>>> *Product Version:* Apache NetBeans IDE 16
>>> *Java:* 19.0.1; OpenJDK 64-Bit Server VM 19.0.1
>>> *Runtime:* OpenJDK Runtime Environment 19.0.1
>>> *System:* Mac OS X version 13.0.1 running on aarch64; UTF-8; en_US (nb)
>>>
>>> I am trying to create a minimal servlet and war file to use with Tomcat
>>>
>>> apache-tomcat-10.0.23
>>>
>>> I worked through half of the demo How to create a webapp tutorial at:
>>> https://www.youtube.com/watch?v=eP9oz6ZKUXM
>>> which, however, uses NetBeans 12 and other older software than I have
>>> installed.
>>> I was able to do the first item successfully with minor adaptations:
>>> 1. Create a Jave Web project with Maven
>>> Got build error:
>>>
>>> https://stackoverflow.com/questions/66920567/error-injecting-org-apache-maven-plugin-war-warmojo
>>> Went to: https://maven.apache.org/plugins/
>>> Answer: manually configuring one of the recent war plug-ins in POM.xml
>>> Changed 2.3 to 3.3.2
>>> Then got the form.
>>> I successfully created the Unit Conversion form which opens in Safari
>>> (Version 16.1) in tomcat: http://localhost:8080/mavenproject3/
>>>
>>> But trying the second—third items:
>>> 2. Create Java Servlet & JavaServer Page (JSP)
>>> 3. Run Java Web App on Tomcat inside NetBeans
>>>
>>> I got stuck.
>>> When I fill in a value in the miles box and click Convert to kilometers,
>>> Safari gives me a
>>> HTTP Status 404 – Not Found
>>> Message The requested resource [/mavenproject3/convert] is not available
>>> Description The origin server did not find a current representation for
>>> the target resource or is not willing to disclose that one exists.
>>>
>>> After a couple of days trying to fix it, I’m still at a loss.
>>> I did get rid of a problem not finding the native tomcat libraries:
>>> INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent
>>> The Apache Tomcat Native library which allows using OpenSSL was not found
>>> on the java.library.path: ...
>>> by dowloading and installing The Apache Tomcat Native library
>>> following instructions here:
>>> https://formulae.brew.sh/formula/tomcat-native
>>>
>>> However, I still get the 404 not found in Safari.
>>> Can anyone help me?
>>>
>>> I wonder whether these debugger messages indicate a problem using a
>>> symbolic link to my real tomcat directory from /Library/Tomcat
>>>
>>> 16-Jan-2023 11:15:13.009 INFO [main]
>>> org.apache.catalina.startup.VersionLoggerListener.log Command line
>>> argument: -Dignore.endorsed.dirs=
>>> 16-Jan-2023 11:15:13.010 INFO [main]
>>> org

Re: [servlet]

2023-01-18 Thread Peter Scharf
Yes, the URL is correct: https://github.com/the-sanskrit-library/public.git
The git directory hierarchy deceived me: I had the code outside the git 
directory.  I have now moved it into the git directory.
Forgive me; I’m not very familiar with git and am using the desktop version.
Yours,
Peter

**
Peter M. Scharf, President
The Sanskrit Library
sch...@sanskritlibrary.org
https://sanskritlibrary.org
**

> On Jan 18, 2023, at 5:35 AM, Carl Mosca  wrote:
> 
> Hi Peter,
> 
> Can you confirm that url please.  I am not seeing Java code there; only a 
> README and attribute file.
> 
> Regards,
> Carl
> 
> On Tue, Jan 17, 2023 at 10:40 PM Peter Scharf  <mailto:sch...@sanskritlibrary.org>> wrote:
>> Thank you for suggesting to put the project on Github.  I have now created a 
>> public repository at the following url:
>> 
>> https://github.com/the-sanskrit-library/public.git
>> 
>> The project is in the NetBeans directory.
>> Yours,
>> Peter
>> 
>> **
>> Peter M. Scharf, President
>> The Sanskrit Library
>> sch...@sanskritlibrary.org <mailto:sch...@sanskritlibrary.org>
>> https://sanskritlibrary.org <https://sanskritlibrary.org/>
>> **
>> 
>>> On Jan 17, 2023, at 2:38 PM, Carl Mosca >> <mailto:carljmo...@gmail.com>> wrote:
>>> 
>>> Hello Peter,
>>> 
>>> Is the project that you created somewhere (such as Github) such that folks 
>>> could take a look at it?
>>> 
>>> Regards,
>>> Carl
>>> 
>>> On Mon, Jan 16, 2023 at 11:21 PM Peter Scharf >> <mailto:sch...@sanskritlibrary.org>> wrote:
>>>> I just installed NetBeans 16 on a MacBook Pro with an M chip:
>>>> 
>>>> Product Version: Apache NetBeans IDE 16
>>>> Java: 19.0.1; OpenJDK 64-Bit Server VM 19.0.1
>>>> Runtime: OpenJDK Runtime Environment 19.0.1
>>>> System: Mac OS X version 13.0.1 running on aarch64; UTF-8; en_US (nb)
>>>> 
>>>> I am trying to create a minimal servlet and war file to use with Tomcat
>>>> 
>>>> apache-tomcat-10.0.23
>>>> 
>>>> I worked through half of the demo How to create a webapp tutorial at: 
>>>> https://www.youtube.com/watch?v=eP9oz6ZKUXM
>>>> which, however, uses NetBeans 12 and other older software than I have 
>>>> installed.
>>>> I was able to do the first item successfully with minor adaptations:
>>>> 1. Create a Jave Web project with Maven
>>>> Got build error:
>>>> https://stackoverflow.com/questions/66920567/error-injecting-org-apache-maven-plugin-war-warmojo
>>>> Went to: https://maven.apache.org/plugins/
>>>> Answer: manually configuring one of the recent war plug-ins in POM.xml
>>>> Changed 2.3 to 3.3.2
>>>> Then got the form.
>>>> I successfully created the Unit Conversion form which opens in Safari 
>>>> (Version 16.1) in tomcat: http://localhost:8080/mavenproject3/
>>>> 
>>>> But trying the second—third items:
>>>> 2. Create Java Servlet & JavaServer Page (JSP)
>>>> 3. Run Java Web App on Tomcat inside NetBeans
>>>> 
>>>> I got stuck.
>>>> When I fill in a value in the miles box and click Convert to kilometers, 
>>>> Safari gives me a
>>>> HTTP Status 404 – Not Found
>>>> Message The requested resource [/mavenproject3/convert] is not available
>>>> Description The origin server did not find a current representation for 
>>>> the target resource or is not willing to disclose that one exists.
>>>> 
>>>> After a couple of days trying to fix it, I’m still at a loss.
>>>> I did get rid of a problem not finding the native tomcat libraries:
>>>> INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 
>>>> The Apache Tomcat Native library which allows using OpenSSL was not found 
>>>> on the java.library.path: ...
>>>> by dowloading and installing The Apache Tomcat Native library
>>>> following instructions here: https://formulae.brew.sh/formula/tomcat-native
>>>> 
>>>> However, I still get the 404 not found in Safari.
>>>> Can anyone help me?
>>>> 
>>>> I wonder whether these debugger messages indicate a problem using a 
>>>> symbolic link to my real tomcat directory from /Library/Tomcat
>>>> 
>>>> 1

Re: [servlet]

2023-01-18 Thread Carl Mosca
Hi Peter,

Can you confirm that url please.  I am not seeing Java code there; only a
README and attribute file.

Regards,
Carl

On Tue, Jan 17, 2023 at 10:40 PM Peter Scharf 
wrote:

> Thank you for suggesting to put the project on Github.  I have now created
> a public repository at the following url:
>
> https://github.com/the-sanskrit-library/public.git
>
> The project is in the NetBeans directory.
> Yours,
> Peter
>
> **
> Peter M. Scharf, President
> The Sanskrit Library
> sch...@sanskritlibrary.org
> https://sanskritlibrary.org
> **
>
> On Jan 17, 2023, at 2:38 PM, Carl Mosca  wrote:
>
> Hello Peter,
>
> Is the project that you created somewhere (such as Github) such that folks
> could take a look at it?
>
> Regards,
> Carl
>
> On Mon, Jan 16, 2023 at 11:21 PM Peter Scharf 
> wrote:
>
>> I just installed NetBeans 16 on a MacBook Pro with an M chip:
>>
>> *Product Version:* Apache NetBeans IDE 16
>> *Java:* 19.0.1; OpenJDK 64-Bit Server VM 19.0.1
>> *Runtime:* OpenJDK Runtime Environment 19.0.1
>> *System:* Mac OS X version 13.0.1 running on aarch64; UTF-8; en_US (nb)
>>
>> I am trying to create a minimal servlet and war file to use with Tomcat
>>
>> apache-tomcat-10.0.23
>>
>> I worked through half of the demo How to create a webapp tutorial at:
>> https://www.youtube.com/watch?v=eP9oz6ZKUXM
>> which, however, uses NetBeans 12 and other older software than I have
>> installed.
>> I was able to do the first item successfully with minor adaptations:
>> 1. Create a Jave Web project with Maven
>> Got build error:
>>
>> https://stackoverflow.com/questions/66920567/error-injecting-org-apache-maven-plugin-war-warmojo
>> Went to: https://maven.apache.org/plugins/
>> Answer: manually configuring one of the recent war plug-ins in POM.xml
>> Changed 2.3 to 3.3.2
>> Then got the form.
>> I successfully created the Unit Conversion form which opens in Safari
>> (Version 16.1) in tomcat: http://localhost:8080/mavenproject3/
>>
>> But trying the second—third items:
>> 2. Create Java Servlet & JavaServer Page (JSP)
>> 3. Run Java Web App on Tomcat inside NetBeans
>>
>> I got stuck.
>> When I fill in a value in the miles box and click Convert to kilometers,
>> Safari gives me a
>> HTTP Status 404 – Not Found
>> Message The requested resource [/mavenproject3/convert] is not available
>> Description The origin server did not find a current representation for
>> the target resource or is not willing to disclose that one exists.
>>
>> After a couple of days trying to fix it, I’m still at a loss.
>> I did get rid of a problem not finding the native tomcat libraries:
>> INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent
>> The Apache Tomcat Native library which allows using OpenSSL was not found
>> on the java.library.path: ...
>> by dowloading and installing The Apache Tomcat Native library
>> following instructions here:
>> https://formulae.brew.sh/formula/tomcat-native
>>
>> However, I still get the 404 not found in Safari.
>> Can anyone help me?
>>
>> I wonder whether these debugger messages indicate a problem using a
>> symbolic link to my real tomcat directory from /Library/Tomcat
>>
>> 16-Jan-2023 11:15:13.009 INFO [main]
>> org.apache.catalina.startup.VersionLoggerListener.log Command line
>> argument: -Dignore.endorsed.dirs=
>> 16-Jan-2023 11:15:13.010 INFO [main]
>> org.apache.catalina.startup.VersionLoggerListener.log Command line
>> argument: -Dcatalina.base=/Library/Tomcat
>> 16-Jan-2023 11:15:13.010 INFO [main]
>> org.apache.catalina.startup.VersionLoggerListener.log Command line
>> argument: -Dcatalina.home=/Library/Tomcat
>>
>> but the infos in the debugger do tell me that it is using the real
>> directories:
>> CATALINA_BASE: /usr/local/apache-tomcat-10.0.23
>> CATALINA_HOME: /usr/local/apache-tomcat-10.0.23
>>
>> I get the following debugger WARNING:
>> WARNING [http-nio-8080-exec-10]
>> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute
>> with value [/mavenproject3] in deployment descriptor
>> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml]
>> has been ignored
>>
>> Trying to follow suggestions at:
>> https://stackoverflow.com/questions/11731377/servlet-returns-http-status-404-the-requested-resource-servlet-is-not-availa
>> I’m lost.  I can’t even figure out which versions of Servlet I’m using,
>&

Re: [servlet]

2023-01-17 Thread Peter Scharf
Thank you for suggesting to put the project on Github.  I have now created a 
public repository at the following url:

https://github.com/the-sanskrit-library/public.git

The project is in the NetBeans directory.
Yours,
Peter

**
Peter M. Scharf, President
The Sanskrit Library
sch...@sanskritlibrary.org
https://sanskritlibrary.org
**

> On Jan 17, 2023, at 2:38 PM, Carl Mosca  wrote:
> 
> Hello Peter,
> 
> Is the project that you created somewhere (such as Github) such that folks 
> could take a look at it?
> 
> Regards,
> Carl
> 
> On Mon, Jan 16, 2023 at 11:21 PM Peter Scharf  <mailto:sch...@sanskritlibrary.org>> wrote:
>> I just installed NetBeans 16 on a MacBook Pro with an M chip:
>> 
>> Product Version: Apache NetBeans IDE 16
>> Java: 19.0.1; OpenJDK 64-Bit Server VM 19.0.1
>> Runtime: OpenJDK Runtime Environment 19.0.1
>> System: Mac OS X version 13.0.1 running on aarch64; UTF-8; en_US (nb)
>> 
>> I am trying to create a minimal servlet and war file to use with Tomcat
>> 
>> apache-tomcat-10.0.23
>> 
>> I worked through half of the demo How to create a webapp tutorial at: 
>> https://www.youtube.com/watch?v=eP9oz6ZKUXM
>> which, however, uses NetBeans 12 and other older software than I have 
>> installed.
>> I was able to do the first item successfully with minor adaptations:
>> 1. Create a Jave Web project with Maven
>> Got build error:
>> https://stackoverflow.com/questions/66920567/error-injecting-org-apache-maven-plugin-war-warmojo
>> Went to: https://maven.apache.org/plugins/
>> Answer: manually configuring one of the recent war plug-ins in POM.xml
>> Changed 2.3 to 3.3.2
>> Then got the form.
>> I successfully created the Unit Conversion form which opens in Safari 
>> (Version 16.1) in tomcat: http://localhost:8080/mavenproject3/
>> 
>> But trying the second—third items:
>> 2. Create Java Servlet & JavaServer Page (JSP)
>> 3. Run Java Web App on Tomcat inside NetBeans
>> 
>> I got stuck.
>> When I fill in a value in the miles box and click Convert to kilometers, 
>> Safari gives me a
>> HTTP Status 404 – Not Found
>> Message The requested resource [/mavenproject3/convert] is not available
>> Description The origin server did not find a current representation for the 
>> target resource or is not willing to disclose that one exists.
>> 
>> After a couple of days trying to fix it, I’m still at a loss.
>> I did get rid of a problem not finding the native tomcat libraries:
>> INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The 
>> Apache Tomcat Native library which allows using OpenSSL was not found on the 
>> java.library.path: ...
>> by dowloading and installing The Apache Tomcat Native library
>> following instructions here: https://formulae.brew.sh/formula/tomcat-native
>> 
>> However, I still get the 404 not found in Safari.
>> Can anyone help me?
>> 
>> I wonder whether these debugger messages indicate a problem using a symbolic 
>> link to my real tomcat directory from /Library/Tomcat
>> 
>> 16-Jan-2023 11:15:13.009 INFO [main] 
>> org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
>> -Dignore.endorsed.dirs=
>> 16-Jan-2023 11:15:13.010 INFO [main] 
>> org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
>> -Dcatalina.base=/Library/Tomcat
>> 16-Jan-2023 11:15:13.010 INFO [main] 
>> org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
>> -Dcatalina.home=/Library/Tomcat
>> 
>> but the infos in the debugger do tell me that it is using the real 
>> directories:
>> CATALINA_BASE: /usr/local/apache-tomcat-10.0.23
>> CATALINA_HOME:     /usr/local/apache-tomcat-10.0.23
>> 
>> I get the following debugger WARNING:
>> WARNING [http-nio-8080-exec-10] 
>> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute 
>> with value [/mavenproject3] in deployment descriptor 
>> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml] 
>> has been ignored
>> 
>> Trying to follow suggestions at: 
>> https://stackoverflow.com/questions/11731377/servlet-returns-http-status-404-the-requested-resource-servlet-is-not-availa
>> I’m lost.  I can’t even figure out which versions of Servlet I’m using, and 
>> the instructions to find out at.: 
>> https://stackoverflow.com/questions/3913485/how-do-i-know-what-version-of-servlet-api-jar-i-have
>> 
>> don’t provide enough context for me to kno

Re: [servlet]

2023-01-17 Thread Carl Mosca
Hello Peter,

Is the project that you created somewhere (such as Github) such that folks
could take a look at it?

Regards,
Carl

On Mon, Jan 16, 2023 at 11:21 PM Peter Scharf 
wrote:

> I just installed NetBeans 16 on a MacBook Pro with an M chip:
>
> *Product Version:* Apache NetBeans IDE 16
>
> *Java:* 19.0.1; OpenJDK 64-Bit Server VM 19.0.1
>
> *Runtime:* OpenJDK Runtime Environment 19.0.1
>
> *System:* Mac OS X version 13.0.1 running on aarch64; UTF-8; en_US (nb)
>
> I am trying to create a minimal servlet and war file to use with Tomcat
>
> apache-tomcat-10.0.23
>
> I worked through half of the demo How to create a webapp tutorial at:
> https://www.youtube.com/watch?v=eP9oz6ZKUXM
> which, however, uses NetBeans 12 and other older software than I have
> installed.
> I was able to do the first item successfully with minor adaptations:
> 1. Create a Jave Web project with Maven
> Got build error:
>
> https://stackoverflow.com/questions/66920567/error-injecting-org-apache-maven-plugin-war-warmojo
> Went to: https://maven.apache.org/plugins/
> Answer: manually configuring one of the recent war plug-ins in POM.xml
> Changed 2.3 to 3.3.2
> Then got the form.
> I successfully created the Unit Conversion form which opens in Safari
> (Version 16.1) in tomcat: http://localhost:8080/mavenproject3/
>
> But trying the second—third items:
> 2. Create Java Servlet & JavaServer Page (JSP)
> 3. Run Java Web App on Tomcat inside NetBeans
>
> I got stuck.
> When I fill in a value in the miles box and click Convert to kilometers,
> Safari gives me a
> HTTP Status 404 – Not Found
> Message The requested resource [/mavenproject3/convert] is not available
> Description The origin server did not find a current representation for
> the target resource or is not willing to disclose that one exists.
>
> After a couple of days trying to fix it, I’m still at a loss.
> I did get rid of a problem not finding the native tomcat libraries:
> INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent
> The Apache Tomcat Native library which allows using OpenSSL was not found
> on the java.library.path: ...
> by dowloading and installing The Apache Tomcat Native library
> following instructions here:
> https://formulae.brew.sh/formula/tomcat-native
>
> However, I still get the 404 not found in Safari.
> Can anyone help me?
>
> I wonder whether these debugger messages indicate a problem using a
> symbolic link to my real tomcat directory from /Library/Tomcat
>
> 16-Jan-2023 11:15:13.009 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dignore.endorsed.dirs=
> 16-Jan-2023 11:15:13.010 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dcatalina.base=/Library/Tomcat
> 16-Jan-2023 11:15:13.010 INFO [main]
> org.apache.catalina.startup.VersionLoggerListener.log Command line
> argument: -Dcatalina.home=/Library/Tomcat
>
> but the infos in the debugger do tell me that it is using the real
> directories:
> CATALINA_BASE: /usr/local/apache-tomcat-10.0.23
> CATALINA_HOME: /usr/local/apache-tomcat-10.0.23
>
> I get the following debugger WARNING:
> WARNING [http-nio-8080-exec-10]
> org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute
> with value [/mavenproject3] in deployment descriptor
> [/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml]
> has been ignored
>
> Trying to follow suggestions at:
> https://stackoverflow.com/questions/11731377/servlet-returns-http-status-404-the-requested-resource-servlet-is-not-availa
> I’m lost.  I can’t even figure out which versions of Servlet I’m using,
> and the instructions to find out at.:
> https://stackoverflow.com/questions/3913485/how-do-i-know-what-version-of-servlet-api-jar-i-have
>
> don’t provide enough context for me to know where to put the commands
> suggested.
>
> ===
> Can anyone help me either (a) work through this tutorial with current
> versions of software, or (b) give me an example of how to create a servlet
> or portable war file in NetBeans to use with Tomcat by copying it to its
> webapps directory using current versions of NetBeans and other software?
>
> Thank you in advance.
> Yours,
>
> **
> Peter M. Scharf, President
> The Sanskrit Library
> sch...@sanskritlibrary.org
> https://sanskritlibrary.org
> **
>
>

-- 
Carl J. Mosca


[servlet]

2023-01-16 Thread Peter Scharf
I just installed NetBeans 16 on a MacBook Pro with an M chip:

Product Version: Apache NetBeans IDE 16
Java: 19.0.1; OpenJDK 64-Bit Server VM 19.0.1
Runtime: OpenJDK Runtime Environment 19.0.1
System: Mac OS X version 13.0.1 running on aarch64; UTF-8; en_US (nb)

I am trying to create a minimal servlet and war file to use with Tomcat

apache-tomcat-10.0.23

I worked through half of the demo How to create a webapp tutorial at: 
https://www.youtube.com/watch?v=eP9oz6ZKUXM
which, however, uses NetBeans 12 and other older software than I have installed.
I was able to do the first item successfully with minor adaptations:
1. Create a Jave Web project with Maven
Got build error:
https://stackoverflow.com/questions/66920567/error-injecting-org-apache-maven-plugin-war-warmojo
Went to: https://maven.apache.org/plugins/
Answer: manually configuring one of the recent war plug-ins in POM.xml
Changed 2.3 to 3.3.2
Then got the form.
I successfully created the Unit Conversion form which opens in Safari (Version 
16.1) in tomcat: http://localhost:8080/mavenproject3/

But trying the second—third items:
2. Create Java Servlet & JavaServer Page (JSP)
3. Run Java Web App on Tomcat inside NetBeans

I got stuck.
When I fill in a value in the miles box and click Convert to kilometers, Safari 
gives me a
HTTP Status 404 – Not Found
Message The requested resource [/mavenproject3/convert] is not available
Description The origin server did not find a current representation for the 
target resource or is not willing to disclose that one exists.

After a couple of days trying to fix it, I’m still at a loss.
I did get rid of a problem not finding the native tomcat libraries:
INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The 
Apache Tomcat Native library which allows using OpenSSL was not found on the 
java.library.path: ...
by dowloading and installing The Apache Tomcat Native library
following instructions here: https://formulae.brew.sh/formula/tomcat-native

However, I still get the 404 not found in Safari.
Can anyone help me?

I wonder whether these debugger messages indicate a problem using a symbolic 
link to my real tomcat directory from /Library/Tomcat

16-Jan-2023 11:15:13.009 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dignore.endorsed.dirs=
16-Jan-2023 11:15:13.010 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dcatalina.base=/Library/Tomcat
16-Jan-2023 11:15:13.010 INFO [main] 
org.apache.catalina.startup.VersionLoggerListener.log Command line argument: 
-Dcatalina.home=/Library/Tomcat

but the infos in the debugger do tell me that it is using the real directories:
CATALINA_BASE: /usr/local/apache-tomcat-10.0.23
CATALINA_HOME: /usr/local/apache-tomcat-10.0.23

I get the following debugger WARNING:
WARNING [http-nio-8080-exec-10] 
org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with 
value [/mavenproject3] in deployment descriptor 
[/usr/local/apache-tomcat-10.0.23/conf/Catalina/localhost/mavenproject3.xml] 
has been ignored

Trying to follow suggestions at: 
https://stackoverflow.com/questions/11731377/servlet-returns-http-status-404-the-requested-resource-servlet-is-not-availa
I’m lost.  I can’t even figure out which versions of Servlet I’m using, and the 
instructions to find out at.: 
https://stackoverflow.com/questions/3913485/how-do-i-know-what-version-of-servlet-api-jar-i-have

don’t provide enough context for me to know where to put the commands suggested.

===
Can anyone help me either (a) work through this tutorial with current versions 
of software, or (b) give me an example of how to create a servlet or portable 
war file in NetBeans to use with Tomcat by copying it to its webapps directory 
using current versions of NetBeans and other software?

Thank you in advance.
Yours,

**
Peter M. Scharf, President
The Sanskrit Library
sch...@sanskritlibrary.org
https://sanskritlibrary.org
**



Payara picks up the old version of code when I go "Debug" on a servlet

2021-03-11 Thread David Gradwell
Looks like Payara is picking up the wrong version of my code when I debug a 
servlet from NetBeans.

The work around is to go into the Admin page and undeploy the old version of 
the servlet.  Then go back to NetBeans and try debug again.  This then uses the 
latest version of the code.

I suspect this has been a problem in the last few versions of the 
NetBeans/Payara combination but only now have I been able to find exactly what 
was happening, find a work around and articulate the problem.  In trying to 
cure the problem, I tried many things such as deleting the NetBeans cache, 
deleting the .m2 cache and changing project version numbers.  None of these 
helped.

I decided to use NetBeans 12.3 and clean build.  That didn’t help either !  The 
good news is that I’ve recompiled most of my code with 12.3 successfully with 
no issues.

The behaviour I would have expected from the NetBeans/Payara combination is 
that when I go debug on a servlet, the NetBeans/Payara combination runs the 
latest version of my code, being the project I’ve just gone right click debug 
on.

Has anyone else had a similar problem ?

Is it a bug worth reporting or just the way Payara works ?  I have kept 
evidence if needed.

Regards

David Gradwell




Web site, servlet deploy and work OK with NetBeans 12.0 beta 4 and Payara

2020-05-19 Thread David Gradwell

I’ve successfully built, deployed and tested a fairly complex web site and a 
heavy duty servlet as Maven projects using Netbeans 12.0 beta 4.  The debugger 
works.

I’ve completed the survey.

I noticed that the survey did not ask about use of native packaging.  Jirka 
please add to the next survey !

Regards

David




Allocate exception on servlet newInstance call moving from NetBeans 8 to NetBeans 11.3

2020-04-20 Thread David Gradwell
Hi,

I have a large handful of servlets that were originally developed under 
NetBeans 8 and Java 8, running on Glassfish 4.1.

I am now trying to move to NetBeans 11.3 and then 12.

On every one of my old servlets I can clean compile once I have changed to 
libraries to javaee-web-api-8.0.jar but I always get an Allocate exception – 
see below.  Trying to trace through the error arises on the new instance by 
name call.  I’ve googled around and made sure that all my servlets have a no 
parameters constructor but that doesn’t help.

I created a new project and that works.

I’ve looked at every point of comparison I can think of (constructor java code, 
web.xml, build.xml, project.xml, libraries, .war contents) but can see no 
difference.  I’ve run under both Glassfish 5.1.0 and Payara latest version with 
the same results under both.  Maybe that’s not surprising since the core code 
is the same.  I’ve run with NetBeans on both Mac OS Catalina and Windows 10 
with the same results.

I’ve kept the Java platform at 8 to avoid changing too much at once.

Looks like I will have to recreate all my servlet projects, but before I do, 
has anyone had the same problem and solved it ?

Thanks

David G


Log Entry Detail


Timestamp
Apr 18, 2020 17:24:53.716
Log Level
WARNING
Logger
javax.enterprise.web
Name-Value Pairs
{levelValue=900, timeMillis=1587227093716}
Record Number
148
Message ID
Complete Message
StandardWrapperValve[TestServlet]: Allocate exception for servlet TestServlet
java.lang.RuntimeException:
at TestServlet.(TestServlet.java:1)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at 
java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at 
com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:292)
at 
com.sun.enterprise.web.WebContainer.createServletInstance(WebContainer.java:779)
at 
com.sun.enterprise.web.WebModule.createServletInstance(WebModule.java:2095)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1350)
at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:1158)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:177)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
at 
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:755)
at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:575)
at 
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
at 
org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:371)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:238)
at 
com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:520)
at 
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:217)
at 
org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:182)
at 
org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:156)
at 
org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:218)
at 
org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)
at 
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:260)
at 
org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:177)
at 
org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:109)
at 
org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:88)
at 
org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)
at 
org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:524)
at 
org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)
at 
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)
at 
org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33

Signing Java Web Servlet for Tomcat

2018-06-25 Thread James Finnall
Hello All,

I am developing a Web application for deployment on a Tomcat server.  I
am using Netbeans 8.2 on Win7 platform for development.  I have the
application built sufficiently for JFileChooser to function correctly
when run locally using XAMPP to save a generated database file.  When
the war file is built and deployed to the Tomcat server, JFileChooser
does not appear to prompt for the filename.  If code is remarked out
and a filename is hardcoded instead then the output is generated and
saved accordingly.  

A reference for this problem stated it was a security related issue
with Tomcat server.  Suggested resolution was to "sign" the applet.

I have installed the plugin "Netbeans Signing" and it appears on the
Tools menu list as "Sign Module".  When I attempt to use it, first
prompts for a project "module".  I have not been able to locate any
directory that will function here.

There was also mentioned an option on the Tools menu list for
"Keystores".  However, I have not located that item either.

I do have my certificate file (.p12) imported into the Windows storage
for my personal identification certificate that I use for signing other
documents, messages and encrypting messages.

Are there any resources available that demonstrate how to sign a web
servlet in Netbeans to deploy on a Tomcat server for a Java Web
application?

Sorry about length of message but certs are always a complicated issue.

thank you,
James


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

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists