Hello,
is it possible to retrieve the full path of the webapp
from the servlet api? For example, the path
C:\tomcat\jakarta-tomcat-5.0.24\webapps\somewebapp
on a windows machine. I searched the ServletContext
and the system properties, but didn't find anything.
(except catalina.home, but thats
What do you mean exactly???
Can you give me a sample server.xml for this ?
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Bill Barker
Sent: Freitag, 30. Juli 2004 05:45
To: [EMAIL PROTECTED]
Subject: Re: SSL Problem need Help!
Edit the file by hand, and get rid of
Hello,
I have got a problem with my Servlet which uses a JDBC database
connection to a Ms SQL Server
There is a getConnection command that should be executed. But this
command fails and throws the exception with description:
[Microsoft][SQLServer 2000 Driver for JDBC] Unable to connect.
Hi all, I have this strange error :
SEVERE: Caught exception (java.lang.OutOfMemoryError: unable to create new
native thread) executing [EMAIL PROTECTED],
terminating thread
I use those parameters :
-verbose:gc -Xms756m -Xmx1024m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC
And the ParNew before
Hi,
Does somebody have more suggestions on this topic?
Thanks.
-Message d'origine-
De : LERBSCHER Jean-Pierre [mailto:[EMAIL PROTECTED]
Envoyé : mardi 27 juillet 2004 19:07
À : '[EMAIL PROTECTED]'
Objet : [jaas integration between tomcat/weblogic]
Hi,
I would like to make EJB-calls
Hello,
I m experiencing problems with Hibernate in tomcat, talking to mysql.
My situation is that I didn't define any connection pools in tomcat, but
left it to Hibernate to handle that...
After leaving the application running for 11 hours, I got following
exception
hi all,
i have a
Hi! I have a problem when triying to configure Tomcat 5.X (under windows XP) to handle
SSL and digital certificate. I have a server certificate (it's valid), so I just
import it to my keystore and follow the instructions to modify the file server.xml
(just change the keystoreFile, keystorePass
Hello,
the SQL error message does not look like if the driver itself could not
be found, it appears more obvious to me, that the connection URL for the
database is incorrect. Please check your database connection string,
maybe the bug hides in there:-)
To your xml problem: Did you also
Hi
I searched the ServletContext ... but didn't find anything.
You propably missed ServletContext.getRealPath( /mywebapp/ );
Regards,
Steffen
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
HI,
i similar the same problem, I whant to setup server based ssl auth, but when i try to
configure vew the webgui the hhtps conntector, tomcat will not start anymore. Can cou
give me your server.xml file, so ican compair eit whith my one ?
-Original Message-
From: POLO ARAUJO,
hi ,
i want to use JDBCAppender with Oracle to log some warning and error depending on
levels .Can u help me how to work with JDBCAppender (Log4j appender) using java. i am
new to it . Can u please mail me some sample example. and how the JDBCAppender works
regards,
shyam
Hello!
Of course, here you are. If you can find the problem, please tell me.
Regards,
Javier Polo.
-
!-- Example Server Configuration File --
!-- Note that component elements are nested corresponding to their
parent-child relationships with each other --
!-- A Server is a singleton
Hi All,
I'm trying to implement my own ClassLoader enabling to load encrypted classes into web
application context under Tomcat 4.0.6. My classloader implements as recommended. But
unfortunately I've got the following runtime exception:
javax.servlet.ServletException: Wrapper cannot find
Hi
I am trying to deploy tomcat securely using https and
X509 certificates issued by a CA. I have followed the
documentation on the tomcat webpage to insert my CA
certificate into the cacerts store in Java as well as
the server.ks and changed the server.xml file.
When I try and run tomcat
Hi,
I am using tomcat 5.0.27 with IIS6 and jk2 2.0.4 on windows 2003 server. I
have IIS in IIS5 isolation mode.
I have noticed that large HTTP POST uploads to my servlet become corrupted.
This does not happen when I upload directly to tomcat. The data is XML that
I am uploading using my own
I compiled UserBean.java manually and rerun the login example application.
JSF related jars are all in WEB-INF/lib.
Everything worked fine.
Resin is much easyer to use because compilation is done automatically by the
server.
Betto McRose G, wrote:
I moved the jar files into common/lib got some
hi all,
i am new to Tomcat.when i went to jakarta site i found lot of compressed
files(
5.0.27 tar.gz PGP MD5
5.0.27 zip PGP MD5
5.0.27 exe PGP MD5
5.0.27 Deployer zip PGP MD5
5.0.27 Deployer tar.gz PGP MD5
5.0.27 Embed zip PGP MD5
5.0.27 Embed tar.gz PGP MD5
Thanks, Funkman, for sending over a response, but I may need a little more
info (from you or anyone!). Could you give an rough example how I code
this into my log pattern if my object --does-- have toString()
implemented?I thought about something like this being possible, but
was not sure how
I did waht all is mentioned, but still i have one problem, radio button not
functioning properly.
when i select new user it will take me to shipping.jsp and if i select
returning usr radio it should take me to another ordersummary.jsp page.
But my application is currently taking me to only
try putting the jstl.jar and standard.jar into WEB-INF/lib
they're usually in jsp-examples/WEB-INF/lib
- Original Message -
From: Lee Chin Khiong [EMAIL PROTECTED]
To: Tomcat Users List (E-mail) [EMAIL PROTECTED]
Sent: Friday, July 30, 2004 1:31 AM
Subject: connection pool docu
Is
flame level='high
AH!! THIS IS A STRUTS QUESTION!! Post it to the right group!
http://jakarta.apache.org/site/mail2.html#Struts
/flame
-Tim
Shilpa Nalgonda wrote:
I did waht all is mentioned, but still i have one problem, radio button not
functioning properly.
when i select new user it
Test your toString() function, here's what access log valve does:
if (null != request) {
HttpSession sess = request.getSession(false);
if (null != sess)
value = sess.getAttribute(header);
}
...
/* try catch in case toString() barfs */
try {
if (value!=null)
if
Use 5.0.27 exe
-Tim
tarini prasad dash wrote:
hi all,
i am new to Tomcat.when i went to jakarta site i found lot of compressed
files(
5.0.27 tar.gz PGP MD5
5.0.27 zip PGP MD5
5.0.27 exe PGP MD5
5.0.27 Deployer zip PGP MD5
5.0.27 Deployer tar.gz PGP MD5
5.0.27 Embed
True, but this is way too much yelling for this early in the morning
(8:30am EDT).
--David
Tim Funk wrote:
flame level='high
AH!! THIS IS A STRUTS QUESTION!! Post it to the right group!
http://jakarta.apache.org/site/mail2.html#Struts
/flame
-Tim
Shilpa Nalgonda wrote:
I did waht all
Where your app goes after submitting is up to your action code.
Normally there's a class that extends org.apache.struts.action.Action
and implements the execute method. Somewhere in that execute method is
something like return mapping.findForward( newUser ) or return
mapping.findForward(
thanks, i forgot to send you my action class, anyway i'll work on it.
just in case if you can find quickly something wrong in the below code let
me know.
Thanks for all ur help David.
public ActionForward execute(ActionMapping mapping,
ActionForm form,
I am trying to find out how I can set my static content for images,
javascript and css to have a different cache-control setting. It appears
that Tomcat always returns Cache-Control: no-cache with every response. I
want to specify certain static resources such as gif and jpg to have
Cache-Control:
Hola,
I believe there's an open issue for this in Bugzilla. Try searching
there and adding information if you have some to add, or contacting the
submitter of the bug to see if they have a workaround.
This is an area of active work for the Connector developers.
Yoav Shapira
Millennium Research
Hi,
That, or just getRealPath(/). Remember, however, that getRealPath
doesn't work when you're running in a packed WAR: all getRealPath calls
would return null, and your code must accommodate that.
Yoav Shapira
Millennium Research Informatics
-Original Message-
From: SH Solutions
Hi,
You could write a servlet filter and only map it to those resources in
web.xml
Ryan
-Original Message-
From: Keith Bottner [mailto:[EMAIL PROTECTED]
Sent: 30 July 2004 13:53
To: [EMAIL PROTECTED]
Subject: How do you set cache-control for static (gif, jpg) resources
I am trying to
Hi,
Tomcat doesn't set any caching headers by itself. To do so, you can
write a simple filter (examples of this filter are freely available on
the net, it's about 10 LOC) that looks at the response content-type and
adds headers as needed.
Yoav Shapira
Millennium Research Informatics
Hi,
Yeah, it's an open issue (I don't remember the number), and will be
addressed in the next release. Until then there's a patch attached to
the Bugzilla item, for HostConfig.java, when you can put in
server/classes to workaround the bug.
Yoav Shapira
Millennium Research Informatics
Hi,
Tomcat already ships with and uses commons-logging, and that's why this
is not trivial. So you need to be careful, and understand the
difference between a ClassNotFoundException and a NoClassDefFoundError.
(As an aside, this is a good interview question, I bet less than one in
five Java
Hi,
You can configure Apache and the Connector to pass any URL pattern to
Tomcat, including *.do.
Yoav Shapira
Millennium Research Informatics
-Original Message-
From: Batpurev [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 10:22 PM
To: 'Tomcat Users List'
Subject: will apache
Hi,
It's not likely a memory problem, but a resources problem for creating threads. If
you're running on unix, look at the ulimit command.
Yoav Shapira
Millennium Research Informatics
-Original Message-
From: Francois JEANMOUGIN [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004
Ok, I wrote a simple filter. No problem. It works!
One question. Is there a standard way to determine if your filter is being
called during the request chain or during the response chain?
If I use
response.putHeader(headerName, fc.getInitParameter(headerName));
It will add the header once
Hi,
You have to call chain.doFilter from inside your filter or the request
doesn't get processed. If you set the header before the call to
chain.doFilter, than you're doing it during the request chain. If you
set the header after the call to chain.doFilter, then you're doing it
during the
Bug 30249
http://issues.apache.org/bugzilla/show_bug.cgi?id=30249
Fix is at
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=29688
-Original Message-
From: QM [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 4:30 PM
To: Tomcat Users List
Subject: in-WAR context.xml in 5.0.27
Previously I was calling doChain at the end of my doFilter method.
Making the change you suggest, calling doChain at the top like
public void doFilter(...)
{
// pass the request/response on
chain.doFilter(req, res);
HttpServletResponse response = (HttpServletResponse) res;
Hi,
Previously I was calling doChain at the end of my doFilter method.
Making the change you suggest, calling doChain at the top like
snip /
DOES NOT INSERT any of my changes into the response stream. If I do it
like
this:
snip /
Then I get two additions in the response stream.
Any more ideas?
There is no request or response chain. Its 1 chain. You probably can't set
headers after doChain() because the response was committed. If anything - you
should see IllegalStateExceptions in the logs.
If your filter is being executed multiple times (via bad mappings or using
the 2.4 API
I believe if you put your context XML files in webapps, Tomcat will copy
them to the Catalina directory, at which point it will consider *that*
context file as the authoritative resource, so updates to your context
XML in webapps won't be recognized.
Not entirely sure on this, but I've had
Unfortunately HttpServletResponse has now way to query the headers only to
set them and determine if they exist. However I have the RequestDumperValve
for both editions of the code. Here is the log for the 1st set of code (your
suggestions).
:
Another good place is the Java Performance Tuning web site. They have a LOT
of really good articles and spend a LOT of time on GC. The IBM developer web
site also has some good articles on memory and GC.
Bob
On Thursday 29 July 2004 12:09 pm, Shapira, Yoav wrote:
Hi,
| The options for
Have you enabled the Connector in server.xml for port 8009?
-Original Message-
From: Harold Pritchett [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 29, 2004 8:27 PM
To: Tomcat Users List
Subject: Strange problem with Apache2/Tomcat4
Help!
I'm trying to install Apache HTTPD and
Hola,
How's the RequestDumperValve useful, if what you want to inspect are the
response headers? Unless you're sending the response to another Tomcat
server and this is the RequestDumperValve's log from that second server?
Yoav Shapira
Millennium Research Informatics
-Original
RequestDumperValve dump's the request and the response.
So the request is first and the response follows the double dash line for
that request.
Tim Funk though pointed out the problem.
You probably can't set headers after doChain() because the response was
committed.
See his entire message for
Hi,
Yeah, I saw his response, but you didn't mention IllegalStateExceptions
in your log so I assumed the response being committed wasn't the problem
;) Weird.
Yoav Shapira
Millennium Research Informatics
-Original Message-
From: Keith Bottner [mailto:[EMAIL PROTECTED]
Sent: Friday,
I'm no expert at the matter, but if tomcat works fine, it seems the problem
has to do more with the mod_jk settings.
Have you tried http://localhost/jkstatus (or equivalent) to see how the
connector is doing?
Have you mapped your applications in the workers.properties file, such as:
Aparently my problem has to do with the ability of mod_jk to interpret the
wildcards in the workers2.properties file.
Anyone with a similar problem? Is there a setting somewhere for allowing
this?
Thanks in advance.
José Ernesto Echeverría
[EMAIL PROTECTED]
Tel. (503)8859011
-Original
Actually I never got any IllegalStateExceptions. When I get some more time I
will have to step through the Tomcat code and find out why I get called
twice since I should only be getting called once.
BTW, the 2.4 Servlet spec supports your analysis. It says the steps are
(specifically step4-5):
Hi,
No problem about the help ;) Sadly enough, I know most of the Servlet
Spec by heart now. But more importantly, I have filters that do stuff on
the request side, check the response headers, and then add headers on
the response side, and they work just as the Spec says on every stable
Tomcat
It must be something particular about Tomcat, or some other weirdness with
my configuration. I will continue to look for the long term problem/solution
when I have more time.
Thanks again,
Keith
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30,
Problem #1: Send us the URL so we can see the syntax... (e.g. a proper mssql
url looks like: String loginUrl =
jdbc:microsoft:sqlserver://localhost:1433;databasename=Northwind;user=sa;pa
ssword=xyz;
Problem #2: There has to be a context-param setting somewhere causing the
problem, look for
Anyone know of a way to register a Servlet web application other than through the
web.xml deployment descriptor?
Thank you -
Bill
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Is there any way I can have my java set the values of FORM elements.
Rather than storing the values in the java code and generating the complete form
element containing that value.
Something like adding something to the response that will give that item a value.
For my particular need, I want
Hi,
The web.xml deployment descriptor doesn't really register a web
application. The registration method is server-specific. For Tomcat,
it's dropping the app or its WAR into an appBase directory, or placing a
Context declaration for the app in the appropriate configuration
directory, e.g.
Have you looked at either Struts, JSTL or the Java Server Faces. I am
sure somewhere in there will be a solution.
Luc Foisy wrote:
Is there any way I can have my java set the values of FORM elements.
Rather than storing the values in the java code and generating the complete form
element
The STRUTS framework would be good for what you are trying to do.
http://www.apache.org
-tp
-Original Message-
From: Luc Foisy [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 12:10 PM
To: Tomcat User List (E-mail)
Subject: Progamatically setting values of FORM elements
Is there
I want to test a virtual host on my local machine (lo
IP), before I add new host to real web server (eth0
IP). So, I added 127.0.0.2 to local machine and now
'ifconfig' returns two IP addresses
loLink encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
lo:0 Link
Hi!
Yes, sorry, it must be Friday :-)
meant to say ... register a Servlet in a web application
Anyone know of a way to register a Servlet in a web application other than through
the web.xml deployment descriptor?
-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
From the responses, I am guessing there is not a way to do this with only the Servlet
API?
I am not currently using struts and learning to use them, implementing them at this
time, I think would be too much of a headache.
I'll have to find an alternate solution that fits into our own framework.
Hi,
Most servers expose proprietary code to do this. Tomcat does, for
example: you'd start with ServerFactory.getServer to get the Server
object. Then crawl down the hierarchy (Service, Engine, Host, Context)
to the webapp you want. Then use the StandardContext#addWrapper and
related methods
Hi,
No, the Servlet API has no concept of HTML.
Yoav Shapira
Millennium Research Informatics
-Original Message-
From: Luc Foisy [mailto:[EMAIL PROTECTED]
Sent: Friday, July 30, 2004 3:41 PM
To: Tomcat Users List
Subject: RE: Progamatically setting values of FORM elements
From the
I've been reading this thread back and forth for quite a few times :)
My observations are tomcat does send response code 304 on static
contents (.js, .jpg, .gif, etc.), so I don't know why you said Tomcat
always returns Cache-Control: no-cache with every response at the very
beginning of this
Cox, Charlie wrote:
Have you enabled the Connector in server.xml for port 8009?
I think so... I'm using the mod_jk connector version 1.2.5 and
NOT version 2. Here's my workers.properties and server.xml files...
workers.properties
worker.list=ajp13
worker.ajp13.port=8009
No concept of HTML. But it does have concept of parameters. When you submit a form,
the form contents are placed in a parameter. (in ServletRequest)
There is no way that I know of to do the reverse, set those parameters on the response
and it will apply to the form elements.
The browser stores
Hello All,
I'm a total newbie to this stuff, but I think I have an easy question
for everyone...
I'm trying to get Tomcat 5 to use Basic Authentication using a JNDI
Realm to our corporate LDAP server. Our server allows read access on
port 389 and bind access on port 989.
Here's the issue.
Well it's not part of the servlet spec and certainly should not be IMHO.
What you can do is to create a bean which sets those parameters from the
request, and pass it to the resulting JSP page. Then in the JSP page you
use getter methods (or EL variables) to populate those parameters. This
is
What is the reason for not wanting to use web.xml?
Luc Foisy wrote:
No concept of HTML. But it does have concept of parameters. When you submit a form,
the form contents are placed in a parameter. (in ServletRequest)
There is no way that I know of to do the reverse, set those parameters on the
Do people agree this is a bug??
should I submit a bug report?
cheers,
David
|-+
| | [EMAIL PROTECTED] |
| ||
| | 07/29/2004 05:57 |
| | PM |
|
I don't know what you want to achieve, but my jspc task generates
package names with subdirectories (eg. org.apache.jsp.user and
org.apache.jsp.admin, in org/apache/jsp/user and org/apache/jsp/admin
respectively) ...
Also I don't know where you set that package= thing?
On 7/30/2004 1:38 PM,
I developped a webapp in Windows XP using Tomcat 5.0.24 (the binary
download). Everything is swell on my machine. When I copied it to a linux
box (using Fedora 2), on which we installed Tomcat 5.0.27 from source, my
application works, but the stylesheet stuff doesn't show at all. Inline
Yes, it will generate the package names if you leave it off (you add
package= to the jspc task, like you do uriroot=${src}\jsp).
I'm trying to get it to give me the **subdirectories** as the full package
name - ie user.myjsp.jsp etc..
cheers,
David
|-+
|
Sun's update on the WSDP 1.4
(http://java.sun.com/developer/technicalArticles/WebServices/JWSDP_1.4/) includes this
note about web containers:
It is worth noting that Sun Java Web Server has better performance than Apache
Tomcat; you can learn more about this from Sun Java Web Server vs.
On Fri, Jul 30, 2004 at 09:00:16AM -0400, Shapira, Yoav wrote:
: Yeah, it's an open issue (I don't remember the number), and will be
: addressed in the next release. Until then there's a patch attached to
: the Bugzilla item, for HostConfig.java, when you can put in
: server/classes to workaround
Try Sun's Studio Creator (Rave). It's all graphical. You don't have to
learn anything, and it does all for you. All you have to do is drag and
drop those check box into a page and you're done. It bases on Java
Server Faces, and the creator of this technology I believe is the same
one how
Dennis,
May I ask what client specifically is accessing your server? The client can
actually send an If-Modified-Since field with its request and the 304 would
be the response if it had not been modified since that specified date/time.
Some intermediary caches (proxies) use this as a more
David Wall wrote:
It is worth noting that Sun Java Web Server has better performance than
Apache Tomcat; you can learn more about this from Sun Java Web Server vs.
Apache/Tomcat Benchmarks.
The link to the KeyLabs report is at
Just downloaded it to give it a try. There's a trial version but
nevertheless it costs only $75.
David Rees wrote:
David Wall wrote:
It is worth noting that Sun Java Web Server has better performance than
Apache Tomcat; you can learn more about this from Sun Java Web Server vs.
Apache/Tomcat
Greetings,
I'm using the ant DeployTask in two different scenarios. One works as
desired, the other not so much. I'm trying to figure out what I'm not
doing right.
Scenario 1: Deploy a packaged .war file.
This is works great. The war parameter to the install task is
Keith,
This is on one of my development servers. I'm mostly using
Mozilla/Firefox, which generate those 304 log entries.
For Internet Explorer, it generates those 304s only after I set the
temporary Internet files to Every visit to the page which is not the
default. It doesn't even make the
I've debugged the problem, here's the answer, in case someone else runs
into the same problem.
the directory WEB-INF was in lowercase (e.g. web-inf) and tomcat
couldn't find the web.xml that it contains as a result. The war ant
task uses the right capitalization when it creates the war, so
OK, i gave up on the mod_jk version 1.2 connector. I downloaded the
version 2 connector and built it with:
./configure --with-apxs2=/usr/local/apache2/bin/apxs \
--with-tomcat-41=/usr/local/tomcat \
--with-java-home=/usr/lib/java \
--with-jni
Installed jkjni.so and mod_jk2.so in
I think that this has been discussed on the list before.
You might want to check the archives.
If I remember correctly, this happens on a Redhat 9 system where the SSL
libraries have been installed via RPMs.
Before running your configure commmand, setting an environment variable
via the
As previously mentioned user killall -9 java command
On Wed, 2004-07-28 at 03:59, dejw wrote:
Hi,
I have tomcat 4.1.30 installed on linux red hat 9 with java version
1.4.1_03. Sometimes when I shutdown tomcat by using shutdown script it
remains java process in memory which I have to kill
Hi Yoav,
According to your suggestion it is advisable not to use
ServletContextListener if we are using load on startup feature.
And we just need to create a separate servlet for destroying daemon
threads.
Please provide us your valuable thoughts.
-Jignesh
On Wed, 2004-07-28 at 08:57,
Hello Christian,
please read the manager app documentation for Tomcat 5 to explain all
deploy parameter.
Here my ant task for remote (war) and local deployment:
Here my build.properties
server.url=http://localhost:7380
app.name=myapps
app.path=/${app.name}
app.version=1.0-dev
QM schrieb:
On Fri, Jul 30, 2004 at 09:00:16AM -0400, Shapira, Yoav wrote:
: Yeah, it's an open issue (I don't remember the number), and will be
: addressed in the next release. Until then there's a patch attached to
: the Bugzilla item, for HostConfig.java, when you can put in
: server/classes
89 matches
Mail list logo