tomcat

Externalizing tomcat jdbc connection pool information for different environments

Greetings, I'm looking for a good solution for externalizing the JNDI connection pool information in context.xml of a war so that as the application moves from dev to QA to prod, the war file won't need to be recompiled. Ideally the url, driver, username and password would be variablized and then populated by means of a properties file...

liferay on slicehost

Could anyone provide the steps to install latest version of liferay on slicehost ubuntu server? ...

setting up mod_jk on the Apache HTTP web server2.2.13

So I'm trying out JSP for the first time. I found a tutorial that details the installation of the tomcat server and the mod_jk Apache module, but it's a bit outdated. Right now, I've got everything installed and the mod_jk.so file in the modules folder, along with the corresponding loadModule line in the httpd.conf file. The tutorial tel...

Restart of Apache Tomacat

Hi, When we change any code in servlet we need to restart Apache ,but when we change any code in JSP we need not restart Apache. Even though at last JSP is turned to Servlet.I ...

local development using tomcat, do I have to setup my IDE in a special way?

Just downloaded netbeans, and curious if I was to play around with JSP's etc., do I have to put my source files in a particular folder layout? How will I hookup tomcat? ...

Differene between tomcat and resin?

Hi, I like to know what are the differences between Tomcat container and Resin container ...

building a high scale java app, what stack would you use?

if you needed to build a highly scalable web application using java, what framework would you use and why? I'm just reading thinking-in-java, head first servlets and manning's spring framework boo, but really I want to focus on highly scalable architectures etc. would you use tomcat, hibernate, ehcache? (just assume you have to design...

Error: Servlet Jar not Loaded

I get the following error: INFO: validateJarFile(C:\dev\server\tomcat6\webapps Sempedia\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, sectoin 9.7.2. Offending class: javax/servlet/Servlet.class The existing resources out there say it is due to a conflict with the servlet.jar or in my case named servlet-api....

Tomcat not shutting down within Eclipse.

I'm building a relatively simple web-app where the main servlet implements the ServletContextListener interface to determine whether the context has been started or stopped. I've implemented my contextInitialized, contextDestroyed, init and destroy methods (both init and destroy call super on the base class). I've currently implemented n...

Apache Tomcat Not Showing in Eclipse Server Runtime Environments

I have tomcat 5.5 installed, running and verifiable at http://localhost:8080/. The Tomcat menu option appears in the Eclipse menu bar and I can start and stop Tomcat from there. In Eclipse, it does not show as a Server Runtime Environment in Window - Preferences - Server - Runtime Environments, nor does it appear in the list of environme...

Why my jsp changes are not reflected without restarting tomcat?

I am editing the jsp files which are residing directly inside tomcat/webapps/myapp/web-inf. But to see the changes i have to restart the server these. As far as i know, jsp changes don't require you to restart the server. The only configuration i found which was related to automatic reloading is reloadable = "true" Set to true if you...

Can I configure the ROOT application to be accessed from another path in Tomcat 6?

I have an application that is deployed as ROOT.war under /webapps in Tomcat. As it is configured now, I can only access the application via http://www.example.com. I'd like to be able to access it using http://www.example.com/myapp without having to change the fact that it is deployed as ROOT. I have the following in my ROOT.xml: <Co...

capacity of ec2 amis

How can I evaluate the capacity of Amazon EC2 Amis for my different templates; A) Webserver (Apache/PHP) - pages/sec. B) Database (MySql) - connections/sec. C) App Server (Tomcat) - pages/sec. I was hoping there was some kind of baseline tool that I can use to evaluate the many choices available on EC2 without using my System Under Deve...

Error code mappings in web.xml not working

Hi, I have created a simple web application, for which I want all responses with 404 status code to be redirected to an error page within my web-app. I have included the following entry in my web.xml file. <error-page> <error-code>404</error-code> <location>/error.html</location> </error-page> In my main servlet, I send back...

Tomcat basic auth

I've got an existing WAR file that is not developed by me. I deploy the application to the Tomcat server and after that it is accessible for everybody. Which is not good. I need to restrict the access to the context with HTTP Basic auth. What is the best way to do that? I do not need any sophisticated user management system I just need a...

Receiving mails with a Servlet

I recently ran across this problem while trying to implement a service that has really simple data entry. Basically what I want to do is to be able to send an email to a special email address and the mail should be parsed and then the data is to be processed by my application. Now I can find hundreds of tutorials on how to send mails fro...

Can you make the Tomcat 6 stdout.log file behave like a log4j DailyRollingFileAppender?

We are using the Windows installation of Tomcat 6. By default, the log4j output for our app goes to the ${catalina.base}/logs/stdout_.log file. This log file only rolls over when we restart Tomcat, and the file name always includes the date. I would prefer it to behave like a DailyRollingFileAppender, where it renames the file when it...

Tomcat and Context paths

I created a web application in Netbeans, and it packages the application in a file called "aa-bb.war". When I run the project in netbeans, I can access it at "localhost:8080/aa/bb". This is all good. Moving the .war file into a standard tomcat installation though, gives me problems. When I drop the .war into the "webapp" directory, it g...

Getting Binary HTTP Post parameter in an Java/Tomcat/HttpServlet

I have a binary value being URL Encoded, and then POSTed to an HttpServlet. The following code shows how I first attempted to extract this data. Very simple except that the result is a String, not bytes. This seemed to work at first, except that an extra byte appeared three bytes from the end. What I eventually figured out was that my d...

Just can't autostart tomcat in Ubuntu. What's wrong?

I tried two ways: Add the following in etc/rc.local: export JAVA_HOME=/home/phoenies/jdk1.6.0_17 export JRE_HOME=/home/phoenies/jdk1.6.0_17/jre export CLASSPATH=.:/home/phoenies/jdk1.6.0_17/lib/* /home/phoenies/scarab-0.21/tomcat/bin/startup.sh Run this: ln -s -t /etc/init.d /home/phoenies/scarab-0.21/tomcat/bin/startup.sh mv /etc/in...