tomcat

Get the server port number from tomcat with out a request

Is there any Tomcat API or configuration available which can tell an application (probably on startup), what port its running on without a request?? *EDIT* Imagine a scenario where there are two web applications running in the same tomcat and one of which need to invoke a web service from the other one. We don't want the request to l...

Installing jar file to Tomcat web application

How do I install a 3rd party JAR file to my tomcat web application? I have placed it in every folder I can think of, and am referencing it like: import com.google.api.translate; Is there a particular folder? I have tried WEB_INF/lib ...

How to clean up threadlocals

Does any one has an example how to do this? or are they handled by the garbage collector? im using tomcat6 ...

Web app framework to call command line program

We're designing a JEE web app (to run on tomcat) It's intended to be a web interface for a command line program. Is there any framework/application that allows this? i.e. JSP pages which will internally fire commands to a program installed on the same server as the Tomcat server. The command line is a propietary non-Java program. ...

Useful environment for CDI / weld web-applications

I am new to weld and consider what environment is useful for a web-application using CDI (Weld). I want to use JSF or Wicket for presentation and JPA/Hibernate for my persistence layer (including Transaction-Management). The obvious scenario is to use a JBoss or Glassfish application server with EJB3 surrounding, but is there not a chanc...

Force a session to time out every 6h hours

A marketing guy came to me with a request to time out the session every 6 hours regardless of the user activity on the site. I understand that if the user leaves his computer for a certain period of time (Set right now to 30 minutes) the session should time out, but forcing a user to log in after a certain period of time just doesn't m...

best way in setting up a j2ee dev and live enviornment

Hi guys i was wondering whats the best way/practise of setting up a j2ee project on a "live" machine that will be accessible worldwide when my web app is deployed and on a dev envrionment i.e. the pc i will use to write code. i have two pc's at home. one is a server that is running certain services open to the world and another is my ho...

Tomcat server Issue

Hi, I've been asked to create a dashboard in Xcelsius(excel based dashboard tool).It gets data in the form of xml which gets embedded in to excel for dashboard consumption. The issue is when I run the dashboard(shockwave file embedded in html page) in eclipse it works great but when I build the WAR file and deploy it in Tom cat server t...

Tomcat internationalization maintenance

Hello, I am trying to implement internationalization in Tomcat. There are going to be different resource text files. My idea is to load all the resources in to the memory while tomcat loads. Below is the sample code to load multiple resource in to the memory. public class ResourceBundleLoader { private static ResourceBundle enRes...

DB connection pool in Standalone Axis2?

For my services in production environment I always set up DB connections pool in Tomcat's context.xml: <Resource name="jdbc/MyDB" auth="Container" type="javax.sql.DataSource" maxActive="256" maxIdle="5" maxWait="10000" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" username="xxx" password="xxx" driver...

Acces from java to tomcat paths

Hello! I have a webapp running in my local tomcat. The path is: tomcat/webapps/myproject. I have some resources in this project all in a folder with this path: tomcat/webapps/myproject/resources So, I am trying to acces to this resources from a java project, using a file config.properties. In this file I have something like this: tom...

how to create War file for a RESTful web service developed in eclipse IDE

Hello All, I ve created a sample REST web service which writes some data in a xml file. Now I have hard coded the path where the xml file is to be written. I want to know how to declare that local path of the file in web.xml file as servlet parameter and how to get the path from there and use it in codebe . Also I need to create the WAR...

java.nio.BufferOverflowException in certificate authentication

I am implementing Client certificate authentication with Spring security using tomcat server I have configured tomcat server and added <X-509> tag in my application_context.xml. then i started server. and when i was trying to login i got above exception. Configuration for tomcat : <Connector port="8443" protocol="org.apache.coyote.htt...

How to setup root url for Restlet

At the root of your Restlet web service, something like this: http://localhost:8080/foobarwebservice/ My page is blank... I suspect that when a user/programmer wants to find out resources available on the webservice and how they should be accessed e.g. url format and parameters to pass. Then it should be here - a REST form of a WSDL ...

is Tomcat compatible with Windows Server and Plesk panel ?

is this correct to use the following for a java web application. Windows Server OS 2003 or 2008 Panel : plesk java Application Server : Tomcat what are the problems and the benefits of using this Host is Tomcat compatible with Windows ? ...

Is there a tomcat anonymous role or user for tomcat security realms?

I want a certain role to be protected with a username/pw in some environments, but not require even a prompt in others. If i have an auth-constraint in a tomcat web.xml, can I create a user with the role needed that is 'anonymous' access? ...

deploying a versioned WAR file to tomcat

I was wondering what would be the best practice to deploy a maven packaged WAR file to tomcat. Using maven release plugin I get a versioned war file for my project eg: myservice-1.0.0.war I would like to deploy it to tomcat so that I can access it as follows eg: http://localhost:8080/myservice By default tomcat explodes the war file a...

Redirect Status Code 302 between Tomcat and IIS 7.0 is not properly handled by the isapi redirector

We recently installed a web application under Tomcat 6 which is connected over the isapi redirector interface (see http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html) to an IIS 7 server. The connector works properly in every case, except for some pages in the web application that return a status 302, with a new location to ...

Liferay authentication and authorization (Siteminder and Custom Tomcat Authorization)

I am new to liferay portal. I am afraid, the questions being raised might be simple, but I am not aware. Please clarify. We are trying to build a Portal using Liferay on Tomcat. This Portal should be authenticated by Netegrity SiteMinder and we have our internal authorization mechanism which is built on tomcat security . I have question...

can't access servlet, 404 not found

edit 10/8/10 @ 8:20am est - since I can't make this work in prod, I'll try to make it fail in test. edit 10/8/10 @ 4:30pm est - having a great time!!! NOT. Ok, hell continues. I learned earlier today that we're also running Apache httpd as a separate process. So we're thinking maybe we're not forwarding the request to Tomcat somehow....