tomcat

How can I get Tomcat to output empty string instead of null?

I just switched over to Tomcat 6.0.26 from a different Servlet/JSP engine. Previously, null values would print out as an empty String. However, Tomcat is printing out nulls as "null". <% String str = null; %> The value of str is <%= str %>. This outputs The value of str is null. How can I get Tomcat to replace nulls with empty/bl...

Problem with downloading large files via Tomcat NIO and Sendfile

I have some problem with downloading using this servlet code which makes use of Tomcat NIO and Sendfile: long fileSize = file.length(); long startAt = 0; if (request.getHeader("Range") != null) { response.setStatus(206); startAt = Long.parseLong(request.getHeader("Range").replaceAll("bytes=", "").split("-")[0]); ...

How much time does Tomcat take to replicate sessions on redeploy

Hi everyone, We have a Tomcat cluster with two instances (version 5.5.25) running on a single machine. We use this to make sure our web page is available and that all sessions survive during redeployment. We were wondering if sessions could be lost during this procedure. Here is what we do: a) Application is running on tomcatA and t...

Tomcat and Ajax Issues

Hello, it's really the first time for me to post. I'am encountering a problem with my Web Apps and cannot find any answers on the web. My problem is that i have a Java Web App that works on parallel with tomcat and apache using mod_jk. Everything works fine, but after one day of running in tomcat, the Ajax request i do with Jquery dos...

tomcat could not run ant reload command

when i enter command ant reload the server generate eception. I write the ant reload script in my buil.xml file. But server could not reload it. Exeption is BUILD FAILED E:\Work\projects\schoolguide_0_2\build.xml:182: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) ...

Steps to run spring mvc basic sample application

So I open up intelliJ ultimate and opened up this application using the pom.xml : https://src.springframework.org/svn/spring-samples/mvc-basic/trunk/ The application built just fine, and I ran it with tomcat 6 (which I setup). I just got a default tomcat welcome screen. What am I missing here? Clicking run showed: Jun 23, 2010 8:2...

NetBeans 6.8: "Java Web" not an option

I'm following this tutorial to set up an existing set of files for a web application, run on Tomcat6, packaged through NetBeans on Ubuntu 10: http://netbeans.org/kb/docs/web/quickstart-webapps.html#setting And I'm stopped at the first step because it says to create a new project, and under categories select Java Web. This isn't a cate...

Tomcat Servlet Default Datetime Format

I'm trying out Endeavour Software Project Management.It's running as a servlet in Tomcat (Catalina). The package came with tomcat and jre configure, got it running quite easily. Everything was fine, except that the Datetime format wasn't as per my machine's configuration. I couldn't find a place to configure the Datetime format. Not in t...

Running Tomcat Servlet as Windows Service

I have a servlet with its package comes with Tomcat preconfigured. A batch file is provided to start the servlet with Tomcat. Now I would like to install it as a windows service. I've done so successfully with exe such as SVN server, but since Tomcat starts with a batch file, I can't install the batch file as service, as it won't run and...

Java web app running under tomcat hangs

The java web app works fine with fresh tomcat recycle. After working for sometime, it hangs. No logs or exception appear at all. A tomcat recycle again brings back the web app to working state. What is the best way to debug this problem? Are there any specific tools to analyze such kind of hung behavior? ...

How to close a HTTP connection from the HttpServlet

I'm running a servlet in Tomcat 6.0.26. The servlet accepts file upload from the client by HTTP POST. I'd like to stop the file uploading from the HttpServlet side. I tried the following methods with no luck: close the request inputstream send error code HttpServletResponse.SC_REQUEST_ENTITY_TOO_LARGE and flush response do 1 and 2 in a...

Clustering on tomcat with spring

Hello! I have a Spring web application with singleton services. There're also some singleton variables such as map with session data for all authenticated users and so on. That all works nice on one server, but how could this system be distributed between a few servers? The system runs under Tomcat. Thanks in advance! ...

Struts2 application giving blank pages while browsing ..

I have struts2 application with struts2 version 2.0, There is no error on server side or client side but frequently its showing blank pages while browsing. It seems like browser could not render the html page. These blank pages are not shown on specific pages but randomly shown on different pages. I have been told to fix problem but co...

tomcat not compiling WEB-INF/libs?

[irrev] I keep making guesses and asking accordingly as to what's wrong here, so take that under consideration. The project I'm working on is setting up a web application, the source of which was sent to us by a chinese company as a portal for the hardware we're buying from them, so a language and time-zone barrier prevents effective co...

Options for using Spring, Hibernate, JPA, and Tomcat with multiple Databases

I have a java web app running under Spring 2.5.6, Hibernate 3.4 (with Hibernate as the JPA provider), and Tomcat 6. I have it working with one DB schema / persistence unit but now need to connect to 2 schemas / persistence units. Can I do this without moving to a J2EE container such as JBoss or Glassfish? Will I need to use something lik...

JSP outside a web container

Hello, I am starting a project that will have many "files" (like a web servers .html or jsp files). Each of these files will have "JSP" embedded in the files, for example; Hello <%="John Doe" %> I would then like to programatically send this file through a "JSP Compiler" and then get the output file. I have looked at the Tomcats...

tr:inputText submitting value 0 instead of null

We are using a tr:inputText in a JSP page and when there is no value written in the inputText the form is submitting a 0 instead of null. We are using Trinidad 1.2.2 and Tomcat 6.0.20 (we also tried with Tomcat 6.0.14 as we read that this could happen with certains Tomcat versions). we reproduced this problem with an h:inputText too. Th...

Tomcat 6, hibernate, oracle 11 logon denied

Project on eclipse 3.5, wicket, spring, hibernate, oracle 11 database and Tomcat 6 (Its a sample from book "wicket in action"). In this project I can not connect to database. Can anybody help to fix it? That is log: 25.06.2010 13:58:32 org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library w...

Integrating Birt reports in JSP

While running my report on the Sever I'm getting this Exception" javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagSupport org.apache.jasper.servlet.JspServlet.service(JspServlet.java:275) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause java.lang.NoClassDefFoundError:...

Confused with SSL configuration and Tomcat

Our application runs in two frameworks. One uses https one does not. I am trying to configure the tomcat connectors to work but when I get it working in one framework it does not work in the other. I have been told we do not need to 'handle' SSL totally as this is handled by our load balancers. Not sure what these means. For example:...