tomcat

What's a good FOSS java servlet session replication solution

I work on a very high volume public website running on Tomcat 5.5. Currently we require stickiness to a particular server in order to maintain session. I'd like to start replicating session, but have had trouble finding a good FOSS solution. I've written my own Manager (using memcached as the store) but am having trouble dealing with ...

Tomcat on Windows server woes

Hi, Synopsis: When calling an executable that links to shared libraries from Java code on Tomcat, I get errors on Windows 2003 whereas the executable works great on a command prompt. I wanted to do this in Linux, but, alas, got outvoted and have to implement it using Windows Server 2003. Here it goes, I have a simple Java code running...

HA Tomcat file writing solution needed

We have a simple Webapp running on two Tomcat instances behind Apache (a Tomcat HA setup using mod_proxy_balancer and mod_proxy_ajp). The role of the webapp is to write incoming request data to a log file. Given that each tomcat instance is running in it's own JVM, how should we implement the log file writing? It would be excellent if ...

Embedding a Tomcat server on CD-ROM (or unwritable disk)

Suppose I need to make a CDROM with a Tomcat server. How can I guarantee that all the jsp files have correctly been compiled before I build the CD image to be burnt ? ...

Best way to manually pull a spring bean?

How do I pull a spring bean manually? I have a rather large web application, and in a given service, a transient object requires access to a bean that is machine specific (database connection info.) Since the application runs in a cluster, this transient object (which can bounce between servers) always needs to grab the correct connectio...

Conntecting remote tomcat JMX instance using jConsole

I am trying to connect to a remote tomcat JMX instance using jConsole. But can't connect successfully. Any Idea? I included the following option in remote tomcat catalina.sh: JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote \ -Dcom.sun.management.jmxremote.port=9004 \ -Dcom.sun.management.jmxremote.ssl=false \ -Dcom.sun...

Edit HTML output from Tomcat

Hi, I have some apps running over a Tomcat Server (Jira, COnfluence & Jforum). I want to add to all of them a banner at the top of the page. Is there any way to modify the output of all of them to show it? Basically, I want to ad a frame for showing it. Thanks! ...

Google Docs PDF Streaming is faster than java servlet Stream?

I am trying to serve PDF (useing tomcat server + Servlet normal streaming). The steaming is stable there is no bug and it handling parallel serving. But not as fast as Google DOC PDF Streaming. My Question is how did they do that fast ? What server they use (Apache + PHP)? or Python? Please suggest which technology i can use to speed ...

where is the best place to start learning about servlet/tomcat?

I need to start developing using this technology servlets/jsp with tomcat. I need to get up to speed fairly quick. What would you recommend to get up there fairly quick? No 900+ pages manuals. A good tutorial (even a video lectures) with lots of examples would be perfect. Thanks ...

Two struts2 webapps fail to start together

I have problems getting two different struts2 webapps to start together in tomcat. But each of the webapps start correctly when placed independently inside webapps folder of tomcat. I get the following in catalina.out logs- SEVERE: Error filterStart Aug 13, 2009 3:17:45 PM org.apache.catalina.core.StandardContext start SEVERE: Context ...

apache tomcat fronting

Is it possible to specify multiple context paths for a single web application? For example I have a tomcat application myapp which runs on port 8080. I want to front this with apache such that localhost/app1 or localhost/app2 both are routed to myapp in tomcat How to achieve this?I don't want to use a redirect ...

Working with errorPage directive with Servlet Filters in Java/JSP

Thanks to everyone in advance, I have overwritten HTTPServletResponse that collects headers and also put together a servlet filter that takes those headers and sets them using their proper methods (example: 500 error code uses response.sendError(500)). I am noticing that when this filter is set in the web.xml, any pages that have the er...

What Are the Benefits of Struts

I recently added Struts 1.3 to my application on Tomcat. Here are my observations, MVC. Servlet/JSP does this fine for me, where JSP is the view and servlet is the controller. I don't see any benefit to get the mapping from an XML file since our mapping is very static. Action Form. I can see some benefits of action form but not huge. T...

Use Tomcat with Java SecurityManager?

I'm writing a web application that is supposed to run on Tomcat on Ubuntu. On Ubuntu, Tomcat is per default configured to run with the Java SecurityManager. Besides my own web application, there will only be some well known third party web applications related to my own, like the BIRT report engine. If one of the web applications fails ...

How to configure Java SecurityManager to allow to read all properties from given file

I'm currently trying to create a policy file for the Nexus repository manager running on Tomcat. Nexus tries to read the file WEB-INF/plexus.properties (for which I already granted permission), and seems to try to read all properties from there, which fails because it is missing the following permission: java.security.PropertyPermissio...

How do I configure tomcat to handle bad HTTP clients?

We're running jBoss 5.1, which in turn uses the Tomcat servlet container. We've been seeing some cases where bad HTTP clients will open a socket, make an HTTP request, fail to read all data and fail to close the connection. The outcome is that the tomcat threads block indefinitely trying to write to the output stream: SocketOutputStre...

PoolableConnectionFactory Invalid handle

I'm deploying an old app on a new box. When hitting the database for the first time I get File input error: Cannot create PoolableConnectionFactory (Invalid handle) I've set up my resource in context.xml, my dsn with unixODBC, and my resource-ref in web.xml. What else am I missing? from content.xml --> <Resource name="jdbc/MoleCo...

how to stop flexbuilder from copying CVS files to tomcat deployment

I have a flexbuilder project (project1) that builds 2 modules. This project has a source path that includes project2 (another flex project that builds an application). When I build project1 it will not copy an xml config file to my tomcat deployment without the 'copy non-embedded files to output folder' option set. However, with that ...

Why can't solr 1.3.0 install using CentOS, plesk 9.2.1 and tomcat 5.5?

Ok I just setup a dedicated server for my client through his hosting provider. They have plesk installed on there (version 9.2.1) and one of the caveats of this dedicated server is that if i do anything OUTSIDE of the control panel (i.e. use SSH) for any task they do not guarantee support for that software component. That's fine because ...

Is a visitor to my website coming from a search engine? What were their search terms?

I'd like to display my page differently for the visitor based on if they came from a search engine or not. I guess I'm detecting search engine referrals? I'd also like to know the search terms used to arrive at my site. My solution so far is this: 1) Filter on the HTTP request referers which contain common search engine URLs, i.e. http...