Tomcat Section Index | Page 7
Does Tomcat 4 have a GUI?
Accessing http://localhost:8080/manager directly will not do anything. You gan give command to it like:
http://localhost:8080/manager/list
You will get a page (very simple) that show all the ac...more
How do I determine a class's file location at runtime?
This method returns a URL to the class file in question. From that you can manipulate it to get what you want.
public java.net.URL locateClass(Class pClass){
// get the name of the class ...more
Can i setup Tomcat to run inside the web server process itself (on Netscape/IIS?), instead of running it as a separate process. Do there something available i can use or do i have to write my own JNI code for this?
Yes. The dirty work has already been done for you. More information can be found at TOMCAT - In-Process HowTo.more
How do I load a properties file from WEB-INF/classes?
We use a number of properties files, both from the classes directory and from sub directories without any problem.
For files directly in the classes directory, our code is like:
Properti...more
How do I write a tunneling HTTP proxy in Java?
[Note: the following is not a full-featured HTTP proxy. Other true HTTP proxies, like Squid, accept the CONNECT request, and can interpret the HTTP headers intelligently. This is a simple tunnel...more
I need to be able to set a system property (i.e. -Dxxx=yyy). How can I accomplish this in Tomcat 4.0?
In Tomcat 3.x you can set the -D properties putting them into the environment variable TOMCAT_OPTS that is added to the JVM starting call from inside the tomcat.sh (or tomcat.bat) script.
Tomcat 4...more
How do I restrict access from servlets to certain directories?
[
How can I only allow the servlets in a specific web application to access only regular Tomcat directories and the directory under /tomcat/webapps/<web_app_name>?
So far I found out that w...more
How do you set tomcat to accept connections from only one specific IP adress?
There is no way. You should filter the IPs out at web server level.
To do that, you should have Tomcat running as an in/out process container, (in other words, not as a standalone), where the we...more
Why do I get the error "IllegalStateException" when using the RequestDispatcher?
Why do I get the error "IllegalStateException"
when using the RequestDispatcher?
How can I authenticate the user from a database?
[
I am using tomcat 3.2 & want to use form based authentication
But to authenticate the user I want to connect to a database instead of
tomcat-users.xml
How can I do this?
]
There's an example f...more
Using jsp:forward on Tomcat, why do I get the error java.lang.IllegalArgumentException at javax.servlet.http.HttpUtils.parseName(HttpUtils.java:285) ?
Using jsp:forward on Tomcat, why do I get the error
java.lang.IllegalArgumentException
at javax.servlet.http.HttpUtils.parseName(HttpUtils.java:285) ?
Why can't my webapp find classes in the WEB-INF/classes directory?
Why can't my webapp find classes in the WEB-INF/classes directory?
Does Tomcat support JMS (Java Messaging Service)?
Alessandro A. Garbagnati writes:
Tomcat is just a servlet container, not an EJB container nor an application server, so it does not contains any JMS basic support.
However, there's nothing stopp...more
How do I load an applet from a servlet or JSP? Where do I place my applet class files?
An applet is executed on the client side (browser), not on the server side (servlet container). You need to place the applet class files in a location accessible from the browser, which means you...more
Is it possible in Tomcat to allow running all servlets from a directory without configuring each one in web.xml ?
Jarek,
maybe you can just use the same logic that is used by the servlet, calling an invoker for the given directory. I never tested it, but it sound right:
<servlet>
<s...more