tomcat

Setup Tomcat XML welcome-file-list to actually forward to a different page?

The problem is this: IE likes caching my rootsite/, which may be different from rootsite/Index.jsp depending on whether the user is logged in. So in effect, users will log out, go to the first site, and it will look like they are logged in. Without disabling caching completely, I need this to stop. My current idea is to use the tomcat ...

Calling EJB in JBoss from Tomcat & passing an object as an argument

I have the following EJB class instantiated in an application running in JBoss 5 public interface ISlaveServer { public String getId(); public String getName(); } @Remote public interface IMasterServer { public String getId(); public void addSlave(ISlaveServer slaveServer); public void removeSlave(ISlaveSe...

Hibernate "could not execute query" Exception!!

exception javax.servlet.ServletException: org.hibernate.exception.GenericJDBCException: could not execute query org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) org.apache.struts.action.ActionServlet.doGet(A...

How do I detect if a remote web page is avaliable

Hi, I need to check if a web page hosted on a remote server via tomcat is deployed or not.There may be a case where the page is not deployed and I need to capture this. I've tried with URL connection but I guess that is only useful for verifying if tomcat is up or down on the remote system. How can I go about verifying whether the page...

How do I set Tomcat Manager Application User Name and Password for NetBeans?

I'm trying to follow a tutorial to make an extremely basic Java web application in NetBeans. When I try to run it, a dialogue box appears title "Authentication Required". Inside the dialogue box there the heading "Tomcat Manager Application" and fields for "User Name" and "Password." Investigating this, I've come to understand that I ...

Axis2 Hello World - cannot find symbol setParam0

Hello guys, i'm trying to develop a simple Hello World web service using Axis2 v1.5, Tomcat6 and Java 1.6, according to the following tutorial. However, i'm getting an error in the client-side code compilation: javac -extdirs C:\\axis2-1.5 org/apache/axis2/*.java -d temp/ returns code\src\org\apache\ws\axis2\Client.java:13: cannot...

How do I set the timezone in Tomcat for a single web app?

What is the best way to set the time zone in Tomcat for a single web app? I've seen options for changing the command-line parameters or environment variables for Tomcat, but is there a way to set it that is self-contained in the WAR file and not dependent on any Tomcat configuration? Edit: to reemphasize, I'm looking for a solution that...

Dual server deployment: PHP and Java

I need PHP for UI coding and I'll be making AJAX requests to a Java backend. I've never deployed two servers before. I'll need Apache for PHP and Tomcat for Java. How can I do this? ...

Setting java system properties to a java application.

Hi, What i'm trying to do, eventually, is to start TOMCAT with certain java system properties set (in this case jmx setup): -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9898 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false` ) Problem is I don't think i'm doing it right...

web based access to a list of files outside tomcat directory.

I have a use case , where I need to display some log files listing to the user,on click of each log file, it should open a new window to display the content of that particular log file. The environement is in Java/Tomcat. The files may reside in a directory outside of tomcat. Can some one tell me , what might be the best approach to do...

Tomcat: Caching SWF files with varying query strings

I'm current loading my SWF from a JSP, and passing parameters to it via query string (e.g. flash.swf?key=1234abcd) which works fine. The problem is that this appears to disable caching completely. My users will likely visit my Flash app with a different query string every time, which will lead to long load times. I see in the headers th...

Use https only for certain pages in tomcat webapp

Hello, I have a struts2 webapp running under tomcat6 app server. The mode is https. The entire site is currently being served on https. But what I would really like to do is setup https only for certain operations like purchase and login. Is there any configuration in tomcat that can help me do this easily? Are there any code changes r...

Access denied when attempting to connect to MySQL from jsp in NetBeans

I'm trying run a simple Java/MySQL web app tutorial in NetBeans. I am able to connect to my database from a standard Java program in NetBeans, and Tomcat is working. But when I try to connect to the database from a JSP, I get the following error: javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection...

JSP web application form based authentication in tomcat.

Hello Guys, I have configured my application to use form based authentication and set up the needed settings in server.xml. When I try to access a protected page I am correctly redirected to login page. On the login page I provide the correct userid and password but it does not log me in, instead shows the login error page. I am using...

How to configure logs/catalina.out of tomcat 6 for per-app. (Configure web-app specific log file for sys.out, sys.err)

Hi All, Requirement is this ... We have our 3 web-applications deployed in RHEL-5 server, we deployed apps with tomcat 6.0.16. We want to configure stdout, stderr, which are coming in tomcat/logs/catalina.out in app specific log file like, tomcat/logs/app1.log tomcat/logs/app2.log tomcat/logs/app3.log we are using log4j, but it is o...

Do Tomcat JDBC Connection pools get shared between instances?

We have a web application right now that we deploy a copy for each client. Our current deployment strategy is to create a uniquely named jdbc connection pool for each instance. so say jdbc/client. They are specified like this... < Context path="/" reloadable="true" docBase="\home\client\ROOT" debug="5" > ...

Configuring Spring based servlet with sysadmin defined properties

I have a web application that's based on Spring and the application contexts, applicationContext.xml and myServlet-servlet.xml contain settings that should be configurable by the sysadmin in deployment. What's the best way to enable changing of settings like [database server details, remote webservice endpoints, etc] without requiring e...

Where to put large static files in a tomcat project?

I have a few relatively big files (Flash movies) which I want to serve. Where should I put them inside my project? I would like not to export them each time I export the .war file, since they take up a lot of space. ...

Configuring Tomcat 6 with eclipse in ubuntu

Eclipse doesn't allow me to create web application while configuring Tomcat 6. It asked to set the Tomcat installation folder, if i set "/usr/share/tomcat6" then it shows "The Tomcat installation directory is not valid. It is missing expected file or folder conf.", if i set "/var/lib/tomcat6" then it shows "The Tomcat installation direct...

access denied when trying to connect to mysql using tomcat datasource

I'm trying to connect locally to mysql 5 server in jsp page using tomcat 6 and datasource. I've configured everything as in the tomcat manual (web.xml, context.xml, etc.), but I get this exception: java.net.SocketException: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve) ...