tomcat6

Tomcat Access Log does not Show Response Header Value

We are setting a response header in one of our JSP pages, through the following code: response.setHeader("X-IA-Session", Integer.toString(clientsession.getS())); In the access log format pattern (server.xml) we added the snippet: %{X-IA-Session}o When checking with WGET the response header is returned correctly, with expected valu...

struts-hibernate project : error in tomcat 6 deployment

Hi, I have developed an web application using struts2 and hibernate 3, that is not being deployed properly in tomcat manager deployer. Error message in manager console : FAIL - Application at context path /classifieds could not be started Also here is the server error log, as in apache tomcat 6 log directory. May 27, 2010 7:17:23 PM...

Problem indexing files in Solr on Ubuntu

Hi, What I want to do is index some documents in Solr and know how it works. I have installed Solr and Tomcat and can see Solr Admin UI at localhost:8080/ solr/ admin/ Now, I want to add some documents to the index, may I know how to proceed further? I find very less documentation on Internet regarding this. In the tutorial http://lucene...

Java mail attachment not working on Tomcat

Hello guys, I have an application which e-mails confirmations. The email part utilises Commons Mail API. The simple code which does the send mail is as shown below; import org.apache.commons.mail.*; ... // Create the attachment EmailAttachment attachment = new EmailAttachment(); attachment.setURL(new URL("http://cashew.org/doc.pdf")); ...

Tomcat admin tools?

I've worked with WebSphere, WebLogic, JBoss, and other app servers in the past. Now, I'm working on an app that will be deployed using Tomcat 6.x. While I prefer using the command line or XML config files, there are times when a good administrative console comes in handy. I've looked at the admin console that Tomcat comes with and fou...

NetBeans and Tomcat Virtual Hosts

Hello all. Let me start out by saying that I am new to Java/JSP web development, so I may have totally missed something simple. If so, I apologize for it in advance. Basically, what I am trying to do is setup local development sites in Tomcat as a separate Virtual Host, similiar to how I have setup Apache Virtual Hosts in the past. I...

Tomcat servlet doesn't fetch request param

The problem is that my servlet doesn't fetch the parameter "protocolversion" (see below) for my Python script for some odd reason. The getParameter call always returns null! Is perhaps the HTTP post request invalid? I use Tomcat 6 with default configuration. A strange thing I've noticed when logging with Wireshark is that Tomcat responds...

NIO Connector in Tomcat

Hi, I'm trying to enable NIO Connector in Tomcat 6.0 by configuring server.xml file, but I'm getting Firefox can't establish a connection to the server at localhost:8081. in the browser whenever I type localhost:8081. This is how I've configured NIO connector in Tomcat 6.0. May I know what's the problem? <Connector connectionTimeout=...

Tomcat6 ignores logging.properties partially

I'm using Tomcat 6, and this is my logging.properties: handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler .level=FINE org.apache.catalina.core.ApplicationContext.level = OFF org.apache.juli.FileHandler.level = ALL org.apache.juli.FileHandler.directory = ${catalina.base}/logs org.apache.juli.FileHandler.prefix = m...

How to use LDAP for authentication in Tomcat with Custom Authorization

Hello, I'm using JNDIRealm with Tomcat for authentication, which at the moment works fine. However, we do not store any roles in the LDAP, so all authenticated users are not returning any roles. This sends user's to an HTTP 401 failed authorization page. I'd like to assign an "Admin" role to any and all user's who authenticate succes...

add external folder to webapp context path in tomcat

I need to add an external folder (Ex: D:\photos) to my webapp context path in Tomcat. Here's what I've done: I've created a xml file MyApp#photos.xml in CATALINA_BASE/conf/Catalina/localhost/ which contains: <?xml version="1.0" encoding="UTF-8"?> <Context docBase="d:\photos"/> but when I try to access this folder at "http://localhos...

building a web application in eclipse

As a concluding assignment for the technologies taught in a data management course, we have to write a web application using the technologies taught throughout the course, this mostly includes xhtml, css, JSP, servelets, JDBC, AJAX, webservices. the project will eventually be deployed using tomcat. we are given the option of choosing the...

How do I add a servlet to an existing website with IIS7 and Tomcat6?

I've configured IIS7 and Tomcat6 successfully with the isapi redirector. I can get my servlets from tomcat's examples, and also my own servlets running from localhost. http://localhost/examples/servlets/ works fine for the supplied tomcat examples. How do i add servlets to existing web sites? I've tried adding a virtual directory to my w...

JSP problem deploying a java web application in tomcat

I'm learning ANT and I'm trying to deploy a web application in tomcat 6.0.20 server. I build the test application and I deploy it with the manager ant tasks and everything goes right. I load a HTML page and it works... When I try to view a JSP tomcat give me a JasperException, coused by a NullPointerException in the auto-generated Servle...

Grant permission to single class

I'm working with a security policy on Tomcat 6. I've successfully granted permissions to my entire webapp, but would like to grant some permissions only to specific classes. However, when I try this, my doPrivileged block receives an AccessControlException. Because I've been successful granting to a more general code base, I went back...

Configuration to get the images from the apache

I have multiple Tomcat servers. In each tomcat I am loading all images. I want to move the images from Tomcat to Apache and access the images from there. My question is: is there any configuration to get the images in a Java web application from Apache instead of Tomcat? ...

How to view the XML documents sent to Solr

We're having problems with UTF-8 in Solr, and need to debug the documents that are sent for indexing. Can we do this somehow? Searched all logs I've found, enabled debug="1" in the app XML in the tomcat6 / Catalina directory. Even tried Wireshark, but no dice. Please please! Everything looks good on the PHP side, and this has been work...

Pre-deployment application properties update on Tomcat 6

Hi everyone I'm looking for the best way to update some properties before deploying of application onto tomcat 6. There is a jee application that's going to be installed on some Windows workstations. Few modules of the app need property update before deploying onto tomcat server. Property updater is realized as standalone java applicat...

Tomcat Traffic Monitoring

What's the best way/tool to measure the amount of traffic has been received/sent from tomcat? ...

NotifyUtil::java.net.SocketException: Connection reset inTomcat

Does anyone have any idea way I get this exception in Tomcat? NotifyUtil::java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:168) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.i...