I am learning session with servlets and i read in the book that to create a session we need to call as below. HttpSession session = request.getSession() This causes the web container to create a session ID and send it back to client so that client can attach it with every subsequent request to the server. When i open developer
Tag: tomcat
Tomcat and Tomcat dbcp issue after upgrade to v9.0.58
I’m getting this issue when upgrading Tomcat and Tomcat DBCP from v9.0.54 to v.9.0.58 with Java 11. Answer This issue was happening when we were trying to create a BasicDataSource BasicDataSource dataSource = new BasicDataSource(); which was imported from import org.apache.tomcat.dbcp.dbcp2.BasicDataSource; So we found a workaround to remove the tomcat dbcp dependency by excluding it from spring-boot starter tomcat and
Slowness after migrating to Grails 5.1.1 – time spent on GrailsControllerUrlMappingInfo
Recently, we migrated our backend APIs from Grails 3 to Grails 5.1.1 Together with it we also upgraded java version to 11. Everything is running on Docker. Otherwise, nothing else has changed. After the migration, we are now facing performance issues. But it’s a weird one. First, we got some results from NewRelic: NewRelic is showing that org.grails.web.mapping.mvc.GrailsControllerUrlMappingInfo is to
What do spring.mvc.view.prefix and spring.mvc.view.suffix have to be?
I created a Spring Boot demo app with Maven using Spring Initializr (that’s my almost the very first usage of Spring). It works, but for some reason doesn’t show any pages besides index.html. If I’m right, that’s because of configuration in application.properties, but I just don’t know, what have I add there. My project’s sources structure: I tried to add
How to send an array as JSON from java servlet to react frontend using fetch()?
I’ve been working on a react app. In this app, I will be sending the input from the user to the Java servlet on the tomcat server to sort it. After sorting, I’m trying to display it on a label in my react app. I’ve successfully sent it to the java servlet using fetch method() and sorted it. This is
Webapp deployment fails after maven implemtation
I am facing issue in deploying my web app on tomcat after I have implemented Maven for dependency management. Before Maven implementation, it was a plain web app where every thing was used to be managed manually. I started upgrading app with frameworks for learning and decided to implement Maven for dependency management as first step. While I implemented Maven
Confused about session management between Apache httpd and Tomcat using mod_jk
I am confused about session management between Apache httpd and Tomcat using mod_jk. I know that Apache is typically used for serving http pages, and Tomcat is used as instructions for handling different types of web requests. So when an application using both of these receives a request, does Apache create a session where within that session a Tomcat session
Multiple application on single PC
I have installed Tomcat server on my server PC with IP 127.0.0.1 One application is running on the server. Let address of the application is: 127.0.0.1:8080/first-project Now if I want to run another application on the same server, address will be: 127.0.0.1:8080/second-project I want multiple application with multiple addresses like 127.0.0.1, 127.0.0.2 a) Is this possible to have multiple address
Does GlassFish servlet container use that catalina?
I am running the same servlet application in both Apache Tomcat and GlassFish servers. I wanted to see the ServletConfig and ServletContext implementation class names. Surprisingly, I found that GlassFish is also using from Apache Tomcat’s catalina classes. Is my observation correct? If yes, why isn’t GlassFish using its own servlet implementation classes? [ Answer According to this FAQ entry
Class not found com.sun.ws.rs.ext.RuntimeDelegateImpl on ubuntu tomcat
I’m using GWT/P to build a webapp which uses javax.ws.rs.client to communicate with rest services. Jersey client is used: It’s deployed on tomcat (7 and 9 versions, both work as expected). However, on one ubuntu server, using tomcat 9 I get following exception: I don’t know why is it looking for com.sun.ws.rs.ext.RuntimeDelegateImpl instead of org.glassfish.jersey.internal.RuntimeDelegateImpl, and that it happens only