Re: Web socket connections scalability

2024-02-05 Thread Christopher Schultz

Saurav,

On 2/5/24 12:07, Saurav Sarkar wrote:

We are on Tomcat 9.0.44 . I understand NIO HTTP connector is used by
default in Tomcat.

We are planning to enable web socket communication. I would like to
understand how many parallel web socket connections can be opened ?


A lot.


I understand that there is no default maxConnections value but actual
connection counts in this case depend on the OS and environment where the
server is running.

Did some one perform any load testing on the number of web socket
connections that can be achieved with the above configuration ?


Any load-testing anyone could perform would be highly dependent upon 
their hardware, network, and client, and thus would not be relevant to you.


Tomcat is unlikely to be the bottleneck for your application if you are 
choosing to use WebSockets. It's much more likely that your application 
or hardware will be the bottleneck.


-chris

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



Re: Return a custom page in the event of a client requesting a non-existent resource on tomcat9

2024-02-05 Thread Christopher Schultz

Kaushal and Mark,

On 2/4/24 15:00, Mark Thomas wrote:

On 02/02/2024 18:48, Kaushal Shriyan wrote:

Hi,

I am running tomcat version 9.0.84 on Red Hat Enterprise Linux release 
8.7
(Ootpa). Is there a way to configure the server to return a custom 
page in

the event of a client requesting a non-existent resource.


Yes.


Please guide me.


To do this at the web application level:

Read section 10.9.2 of the Servlet 4.0 specification


To do this globally, look at the errorCode.nnn attribute of the 
ErrorReportValve


https://tomcat.apache.org/tomcat-9.0-doc/config/valve.html#Error_Report_Valve


You can also deploy a ROOT web application which maps HTTP status codes 
to whatever pages you want (configured as per Servlet spec referenced 
above).


-chris

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



Web socket connections scalability

2024-02-05 Thread Saurav Sarkar
Hi All,

We are on Tomcat 9.0.44 . I understand NIO HTTP connector is used by
default in Tomcat.

We are planning to enable web socket communication. I would like to
understand how many parallel web socket connections can be opened ?

I understand that there is no default maxConnections value but actual
connection counts in this case depend on the OS and environment where the
server is running.

Did some one perform any load testing on the number of web socket
connections that can be achieved with the above configuration ?

Best Regards,
Saurav


Re: Tomcat taglibs 2.0.0 release?

2024-02-05 Thread Greg Huber
I was testing struts 7 (tomcat 10) and I also use jstl for my 404,403s etc
(when I have no struts context) ie thrown from web.xml:


   403
   /WEB-INF/jsp/errors/403.jsp


Previously on this list it mentioned using the glassfish version.  Think
glassfish is eclipse?


org.glassfish.web
jakarta.servlet.jsp.jstl
3.0.1


Seemed to work OK.



On Mon, 5 Feb 2024 at 15:50, Jeroen Hoffman 
wrote:

> On Mon, Feb 5, 2024 at 4:05 PM Mark Thomas  wrote:
>
> > >
> > > Are there plans to release the 2.0.0 version?
> >
> > No plans.
> >
> > Tomcat 10.1.x onwards uses the 1.2.5 taglibs release converted for
> > Jakarta EE using the Tomcat migration tool.
> >
>
> Thanks for the quick answer!
>
> Could you share some details on the migration? In a standard Tomcat 10 I
> see taglibs-standard-spec-1.2.5-migrated-0.0.1.jar and
> taglibs-standard-impl-1.2.5-migrated-0.0.1.jar in the examples webapp, but
> these are not published to Maven Central. So can an implementation reuse
> already converted jars or should it also do a conversion?
>
> TIA, Jeroen
>


Re: Tomcat taglibs 2.0.0 release?

2024-02-05 Thread Mark Thomas

On 05/02/2024 15:49, Jeroen Hoffman wrote:

On Mon, Feb 5, 2024 at 4:05 PM Mark Thomas  wrote:



Are there plans to release the 2.0.0 version?


No plans.

Tomcat 10.1.x onwards uses the 1.2.5 taglibs release converted for
Jakarta EE using the Tomcat migration tool.



Thanks for the quick answer!

Could you share some details on the migration? In a standard Tomcat 10 I
see taglibs-standard-spec-1.2.5-migrated-0.0.1.jar and
taglibs-standard-impl-1.2.5-migrated-0.0.1.jar in the examples webapp, but
these are not published to Maven Central. So can an implementation reuse
already converted jars or should it also do a conversion?


We don't have any plans to publish the migrated JARs.

You can re-use those JARs if you wish or migrate them and publish the 
result in your local/company repo.


Mark

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



Re: Tomcat taglibs 2.0.0 release?

2024-02-05 Thread Jeroen Hoffman
On Mon, Feb 5, 2024 at 4:05 PM Mark Thomas  wrote:

> >
> > Are there plans to release the 2.0.0 version?
>
> No plans.
>
> Tomcat 10.1.x onwards uses the 1.2.5 taglibs release converted for
> Jakarta EE using the Tomcat migration tool.
>

Thanks for the quick answer!

Could you share some details on the migration? In a standard Tomcat 10 I
see taglibs-standard-spec-1.2.5-migrated-0.0.1.jar and
taglibs-standard-impl-1.2.5-migrated-0.0.1.jar in the examples webapp, but
these are not published to Maven Central. So can an implementation reuse
already converted jars or should it also do a conversion?

TIA, Jeroen


Re: Tomcat taglibs 2.0.0 release?

2024-02-05 Thread Mark Thomas

On 05/02/2024 14:16, Jeroen Hoffman wrote:

Hi everybody,

I have a question on Tomcat taglibs, I chose this mailing list because 
the taglibs-user one seems inactive.


We in the process of updating our application to use Java 17 and Tomcat 
10, including javax/jakarta change. It uses Tomcat Standard Taglibs. We 
noticed that the code base [1] has been reworked 4 years ago to use 
jakarta, development version is 2.0.0-SNAPSHOT.


Are there plans to release the 2.0.0 version?


No plans.

Tomcat 10.1.x onwards uses the 1.2.5 taglibs release converted for 
Jakarta EE using the Tomcat migration tool.


Mark

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



How to deal with beans.xml during process of GraalVM native image build?

2024-02-05 Thread Jun Suzuki
Within a spring framework application, it uses beanx.xml to define a
bean names "GreetingService":




 And this bean is being called as below:
===
 ApplicationContext context = new
ClassPathXmlApplicationContext("config/beans.xml");
GreetingService greetingService =
(GreetingService)context.getBean("greetingService");
PrintWriter out = resp.getWriter();
out.println(greetingService.getGreetingMessage());
===

Above code runs perfectly as a war file on Tomcat. But when I try to
transform the war file into native image by following the
guidelines(https://tomcat.apache.org/tomcat-11.0-doc/graal.html),
maven build gave following errors:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile
(default-compile) on project tomcat-stuffed: Compilation failure
[ERROR] 
/home/opc/project/test/tomcat-native/stuffed/src/main/java/com/example/servlet/GreetServlet.java:[55,36]
cannot find symbol
[ERROR]   symbol:   method getGreetingMessage()
[ERROR]   location: variable greetingService of type
com.example.service.GreetingService

Beans.xml is under the "src/main/resources" folder. To which directory
should I copy the beans.xml under the stuffed folder?  ("conf" folder
or "src" folder?)
By the way, when using Java configuration to configure the bean
instead of using beans.xml, everything goes perfectly without errors.
May I confirm, whether XML-based bean configuration within a spring
framework application is also applicable to the process of AOT/GraalVM
support?

Jun

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



Tomcat taglibs 2.0.0 release?

2024-02-05 Thread Jeroen Hoffman

Hi everybody,

I have a question on Tomcat taglibs, I chose this mailing list because 
the taglibs-user one seems inactive.


We in the process of updating our application to use Java 17 and Tomcat 
10, including javax/jakarta change. It uses Tomcat Standard Taglibs. We 
noticed that the code base [1] has been reworked 4 years ago to use 
jakarta, development version is 2.0.0-SNAPSHOT.


Are there plans to release the 2.0.0 version?

Regards,
Jeroen Hoffman

[1] https://github.com/apache/tomcat-taglibs-standard


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