tomcat

Can you pick up the source from a tomcat-deployed application?

Can you extract source from tomcat application? The webapp is not deployed as a .war file, it's a bunch of directories, xmls, configurations, .class files, .jars and stuff. ...

Calling DisplayTag returns NullPointerException

We've been using DisplayTag for awhile now without any problems, but recently, we had a wonky hdd and so we had to restore some of the stuff on there. Unfortunately, DisplayTag broke and stops everything else when called: <display:table name="pageScope.userKeyList.licenseKeyList" id="userKey" pagesize="10" defaultsort="7" defaultorder="...

Tomcat--Web Server or Web Container?

Hi, I've a small doubt in my mind; could anyone please clarify me is the Tomcat web server or Web container? ...

Why does tomcat6 have folders in both /var/lib/ and /usr/share/?

I'm new to Linux, and I don't understand why apt-get install tomcat6 resulted in two tomcat6 folders, one in /var/lib/, the other in /usr/share/. I'm sure there is a good reason for it, but it caused me a few hours confusion with nothing working. What's the deal? ...

How do I undeploy/completley-remove .war deployed under webapps directory when Tomcat 6.x is uninstalled?

Hi All, Does anyone know of a method to remove all webapps deployed from .war files when uninstalling Tomcat (other then Shift + Delete . . .)? The reason I ask is is described below. I am using InstallShield 2009 to lay down a copy of the JRE and Tomcat 6.x, where the Tomcat start/stop uses org.apache.catalina.startup.Bootstrap and i...

tag library descriptor

This is Jsp page taglib : <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> ERROR : HTTP Status 500 - -------------------------------------------------------------------------------- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exc...

Installing SOLR 1.4 with plug-ins on Windows

Hey guys I installed Tomcat, and got SOLR version 1.3 working no problem by copying the "conf" directory from the "example" directory in the 1.3 release files. Now I've just downloaded the SOLR 1.4 release, but can't get it to work. I've noticed the new solrconfig.xml file in the 1.4 release "example" directory has some new settings w...

Problem with Undeploy Task in Tomcat 6

Hello there, I am using Tomcat 6, Apache Ant 1.7.1 and JDK 1.6 on OS X Snow Leopard... Created the following build script and supporting property files: (1) build.xml <?xml version="1.0"?> <project name="${project.name}" default="deploy" basedir="."> <property file="build.properties"/> <property file="admin.properties"/> ...

Use Tomcat 6.0 as server for java web application cause javax.persistence annotations to be messed up

Normally, I use Glass Fish as my testing server for NetBeans. Recently, I tried to switch to Tomcat 6.0. As soon as I changed the server, compiler no longer understand javax.persistence.Entity. When I checked out the library structure of Tomcat 6.0, there was a file named annotation-api.jar, in which another javax.persistence package res...

How to define an example in a JSP taglib <tag-file> element?

I'm currently writing a bunch of JSP tags for our designers to use. In my .tld file I have some <tag> and many more <tag-file> elements. Now, I want to give the users of the tag library some examples about how to use them. According to Sun's documentation both <tag-file> and <tag> elements are allowed to have an <example> element. This...

CXF Service Assistance

I'm not a Java programmer by any sense, so I apologize if this is a stupid question. I have a service that was given to me, that basically searches the inventory of a future partner. The file they sent is a compiled .jar file, and a wsdl file. The read me file states that it can be used with XFire or CXF. The question is, how do I set th...

Listener Class not invoking method ?

I'm working on a Dynamic Web Project in Eclipse. The whole project was loading properly upon clicking the run in server button, a week back. But yesterday, when I pressed the run in server button, the console would give an error message stating that it can't load the Servlet Context. The server is Apache Tomcat 5.5 and the following is t...

Session Management in Tomcat

Hi, I have developed a simple web-app with 2 servlets A and B. I have a few doubts related to session management for the web-app by Tomcat. NOTE - I have disabled cookies in my web-browser (Chrome) while accessing the web-app. 1.) When the web-app is first hit, Servlet A gets invoked. Servlet A accesses the session from the request a...

Tomcat 6.0 does not allow generic ArrayList to be used for useBean

In a jsp file I have this declaration: <jsp:useBean scope="request" id="products" class="java.util.ArrayList<sgt.supermarket.entity.Product>"/> This declaration works fine with GlassFish 2.1, however, when I switch to Tomcat 6.0, exceptions is thrown: The value for the useBean class attribute java.util.ArrayList is invalid. Is there...

Writing a variable into the JSP request scope doesn't work

I have a problem where I am trying to set a variable in a JSP page that should be available to all other pages serving this request. <c:set value="foo" scope="request" var="bar" /> However, when I try to read the variable from another page (the master JSP that puts everything together) it is empty. Should this ever happen? Is there so...

Tomcat - UnsupportedClassException

Hi, I have a problem deploying compiled classes in a Tomcat web application: I'm deploying a class which is to be called from a servlet, but when I run the application it fails telling me of a ServletException: Error allocating the servlet instance due to an UnsupportedClassVersionError: Bad version number in .class file. Tomcat is usin...

The infamous "No suitable Driver" exception for Tomcat 5.5, Postgres, and JDBC

Hey y'all, I'm trying to add a database-enabled JSP to an existing Tomcat 5.5 application (GeoServer 2.0.0, if that helps). The app itself talks to Postgres just fine, so I know that the database is up, user can access it, all that good stuff. What I'm trying to do is a database query in a JSP that I've added. I've used the config exam...

tomcat oracle datasource

I have apache tomcat 5.5.28 on my windows box and I am trying to deploy a web application (WAR) which works fine on other servers. However I am having trouble creating a datasource. I am not sure of the format. The db is oracle. Here is what I have in server.xml. <GlobalNamingResources> <Environment name="simpleValue" ...

Gaining access to jndi environment variables within a Tomcat LifecycleListener

I'm using a LifecycleListener in tomcat to initialize some objects required by contexts in my web server. Within LifecycleListener I would like to have access to GlobalNamingResources Environment variables to keep the configuration for the server inside the server.xml file. When trying various approaches I get the following error: jav...

Sometimes HttpURLConnection.getInputStream executes too slowly

We have next code. Sometimes we should wait 10-20-40 seconds on the last line. What can be the problem? Java 1.4 URL url = ...; HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setDoInput(true); conn.setDoOutput(true); conn.setUseCaches(false); conn.connect(); OutputStream out = conn.getOutputStream(); ObjectOu...