If the browser supports it you would send the whole page in one
multipart response a bit like a mail message.
Here's one way to do it:
So, you'd have to buffer the response. Then create a
javax.mail.internet.MimeMultipart and add BodyParts
(javax.mail.internet.MimeBodyPart) for the html and
You don't need a WAP gateway. The mobile operator's have them and they
proxy the browser request :)
You just need to make sure the wml you vend is valid and sent with the
correct mime type and the operator's gateway will do the rest
(conversion to wmlc, a wbxml tokenized version of the markup).
time I looked there weren't any mature OSS gateways written in
java. That could have changed though...
Jon
Carl Olivier wrote:
Hi.
Great. Thanks! Is there Gateway software available though? If you wanted
to set your own gateway up?
Carl
-Original Message-
From: Jon Wingfield
I did an AJAX version of this a couple of months ago.
The slight gotcha is that the AJAX request prolongs the life of the
session (you can't, it seems, override the cookie for AJAX requests) so
the interval has to be slightly longer than the expiry time for the session.
Reynir Hubner wrote:
Try the binary distribution instead of the source bundle:
http://archive.apache.org/dist/tomcat/tomcat-4/archive/v4.0.5/bin/
Either jakarta-tomcat-4.0.5.zip or jakarta-tomcat-4.0.5.exe should be fine.
CATALINA_HOME will probably then be:
C:\tomcat\jakarta-tomcat-4.0.5
HTH,
Jon
Aaron Bortman
Also be aware that autoReconnect=true only works (according to the mysql
docs) for Connections with autocommit set to true.
If you are using a connection pool make sure it checks the validity of
Connections every so often. This is configurable for DBCP:
Our custom loader sits in a jar in $CATALINA_HOME/server/lib
Our classloader uses different parent classloaders depending on which
version of TC is running.
In 4.1 we just use the parent classloader as supplied in the constructor.
In 5.0.x we use the classloader of WebAppClassLoader as the
Your html isn't correct:
http://www.w3.org/TR/html4/interact/forms.html#h-17.3
I would remove the enctype attribute, correct the accept-charset name
and see if you get any further.
HTH,
Jon
Manish Dalakoti wrote:
Hi,
I'm using form-based authentication.
Although i'm able to create
Your underlying problem is the exclamation mark at the start of your
scriptlet. This makes the jsp ompiler put free standing code into the
init method or creates methods on the servlet that you can call within
your jsp. Without the exclamation mark the compiler inlines the
scriptlet into the
Is it a mime-type issue?
The content is probably being vended as application/octet-stream, which
the mobile device is probably not liking.
You can add additional mime-mappings into your web.xml.
If you are fronting tomcat with apache httpd you can also add
mime-mappings into the httpd.conf
You are using jdk1.5 features (autoboxing, for example ) in your JSP pages.
Early versions of the 5.5 tree bundled a jsp compiler (JDT) which didn't
support these new language features.
Later versions bundled an updated version of the compiler...
For deploying on 5.5.9 just get rid of your
That looks ok. Timestamp is the correct thing to use.
You have two systems: one that works, one that doesn't. So, check for
differences in the SQL sub-systems between the two:
Are the drivers of the same (uptodate) version?
Are the database schemas using the same column type? (ie the one that
of timestamp variable.
Oracle does have a Timestamp field/data type, but you don't have to make it as
such to get this to work.
Could have been that my JDK API differed slightly from your's.
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 08
to make it as
such to get this to work.
Could have been that my JDK API differed slightly from your's.
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 08, 2007 4:49 AM
To: Tomcat Users List
Subject: Re: [OT] JDBC problem
Your Realm implementation needs to sit in the server classloader as the
Realm interface is only defined there (in catalina.jar).
This is a PITA so when we did this we made the Realm implementation just
lookup the real implementation via JNDI. That way all the authentication
logic stayed in
would happen.
Zsolt
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 23, 2006 5:05 PM
To: Tomcat Users List
Subject: Re: How to configure my Realm class from context.xml?
Your Realm implementation needs to sit in the server classloader as the
Realm
Compression works very well.
I added a homegrown GZip filter to the AXIS urls and also saw approx 10x
compression. There are also a number of similar OSS Filters out there.
There were .NET clients accessing the web-services and they needed a
tweak to handle the compression:
Try replacing the ampersand character with the xml entity amp;
HTH,
Jon
Mark Whitby wrote:
Further to my email earlier I've discovered I can either have the
truncation on or the reconnect on, but I can't include both in the url
otherwise Tomcat doesn't start up. Also, if I take off the
Looks like you are running the default access log settings.
For logging of user-agent and referer (when given) try:
CustomLog logs/access_log combined
http://httpd.apache.org/docs/1.3/logs.html#accesslog
HTH,
Jon
Scott Purcell wrote:
I really would like to find out how my (and if my site)
][/unique]=INFO, R
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Monday, March 27, 2006 8:15 AM
To: Tomcat Users List
Subject: Re: Distinguish between users and robots in access log?
Looks like you are running the default access log settings.
For logging
I may be wrong but I think there are only two predefined names: common
and combined. For all others you set the pattern attribute to the
required number and ordering of pattern elements as defined in the docs.
From the docs:
The shorthand pattern name common (which is also the default)
What is buf.length? Is it the actual length of the data you want to post
or is it 8k?
The data you receive on the Tomcat side may be truncated by the
Connector if the body data is longer than the value set for the
Content-Length header.
HTH,
Jon
Vikram Goyal wrote:
Hi all,
I am trying
After re-reading the original description you should probably be aware
of this portion of the javadocs for request.getParameter:
quote
If the parameter data was sent in the request body, such as occurs with
an HTTP POST request, then reading the body directly via
getInputStream() or
At a guess:
http://svn.apache.org/repos/asf/tomcat/build/tags/tc5.5.x/TOMCAT_5_5_15/
Joe Bohn wrote:
Mark,
Thanks for the clarification. One more question. Is there a branch or
tag in SVN for 5.5.15? I can get the source for 5.5 but I don't know
how to get the source for a dot release.
From previous posts to this list I believe the WebDAV servlet shipped
with tomcat is intentionally a bare bones implementation.
Have you seen the Slide project? http://jakarta.apache.org/slide/index.html
Jon
[EMAIL PROTECTED] wrote:
I want to make my own implementation of
Or better, read
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html
and
http://tomcat.apache.org/faq/classnotfound.html
and deploy your application code appropriately.
For the impatient: Tomcat doesn't use CLASSPATH. It sets up its own
based on the servlet specification. Each
I would turn on the access logs (if you haven't already) and check that
the browser isn't actually sending two requests.
This can sometimes happen if the user double-clicks submit buttons.
There are plenty of threads in the archives of this list suggesting ways
to mitigate this
Have you tried the request attributes specified in section SRV.9.9
Error Handling of the servlet spec? Specifically, the request attribute
named javax.servlet.error.request_uri.
HTH,
Jon
Tomas Pop wrote:
Hello,
I have a problem with change of the method
HttpServletRequest.getRequestURL()
Netbeans profiler. Free and does a pretty good job.
http://profiler.netbeans.org/
http://profiler.netbeans.org/docs/help/5.5/profile_j2ee.html
asaf.lahav wrote:
Can anyone recommend a good (and FREE) java profiling tool that can be used
to profile a webapp running under Tomcat 5.5?
Another thing to note is that mysql automatically closes idle
connections after 8hrs (by default).
You can configure DBCP to test on borrow or to periodically squirt some
sql down idle connections.
HTH,
Jon
David Wood wrote:
Chris,
Thanks very much for the suggestion.
I'm not using
Can't you add the filter to conf/web.xml? I think tomcat (conceptually)
folds all of conf.xml into each webapp's web.xml.
Again, this behaviour is tomcat specific but at least the filter isn't.
Jon
Filip Hanik - Dev Lists wrote:
in tomcat you can write a Valve
Additionally, many client-side Security/Anti-Virus software packages
automatically remove the referer header from requests.
Markus Schönhaber wrote:
Robert Kudyba wrote:
We have our server.xml file set w/ the following entry:
Valve className=org.apache.catalina.valves.AccessLogValve
In addition, custom Realms merely need to create instances of Principal.
There is no requirement for them to extend GenericPrincipal.
Our Realm classes are deployed to server/lib
Our extension to Principal is deployed to common/lib
See the thread Is custom realm using user/role data in webapp
the list of roles associated with the
principal.
Thanks for the pointer.
Any issues moving all the jar from server/lib to common/lib for a quick
workaround?
On 6/29/06, Jon Wingfield [EMAIL PROTECTED] wrote:
In addition, custom Realms merely need to create instances of Principal
You need to look at your access logs. You'll probably see two requests.
Your form submit button calls javascript which also calls form.submit().
I think, if you don't return false from the javascript you will get two
form submissions. Try removing the form.submit() from the javascript.
HTH,
The HTTP spec (rfc2616) says clients should only send the Date header
with http messages with body content (POST, PUT) and even then it's
optional.
Try adding a date string as a parameter on your GET request which your
servlet can then parse from request.getParameter(...).
One way to do
Probably not without using standard java io and a file path (which you
can't rely on for packed web-apps).
If the file was in /appName/WEB-INF/classes it would be a resource that
could be found by the classloader.
HTH,
Jon
sbell wrote:
Hello,
Is there anyway of referencing a properties
I would check in tomcat logs directory for reasons why the servlet is
not available. One reason could be that classes should be in a package:
http://tomcat.apache.org/faq/classnotfound.html
HTH,
Jon
McRaven, Brian wrote:
OK I did that and now my system is hanging which I guess could be an
of package
3 changed entry in web.xml file to reflect package that servlet is in
for the url-pattern
4 changed JSP so that the forms action=firstpack.JustALittleTest
I've looked at the log files but I'm not sure what to look for.
Brian
-Original Message-
From: Jon Wingfield [mailto:[EMAIL
that the forms action=firstpack.JustALittleTest
I've looked at the log files but I'm not sure what to look for.
Brian
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 12, 2006 7:49 AM
To: Tomcat Users List
Subject: Re: Accessing a servlet
I would
go?
Brian
-Original Message-
From: Jon Wingfield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 12, 2006 11:30 AM
To: Tomcat Users List
Subject: Re: Accessing a servlet
You've deployed this in the ROOT webapp?
form action should be /firstpack/JustALittleTest
McRaven, Brian wrote
The process running tomcat can't (read isn't allowed by OS) to create
any more threads:
java.lang.OutOfMemoryError: unable to create new native thread
If you are on unix you can up the number by tinkering with the ulimit
command.
HTH,
Jon
MW Janssen wrote:
Hi,
Can anyone explain and
This may be of help (emphasis on may):
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4765019
Has a bit about tuning Xss for a high number of threads.
MW Janssen wrote:
Hi,
These are my parameters:
I have Xmx1024m and Xms1024m as well for the heap size memory. I dont set
Xss so I
You'll probably need to write your own connector!
See prepareResponse method:
http://svn.apache.org/repos/asf/tomcat/connectors/trunk/http11/src/java/org/apache/coyote/http11/Http11Processor.java
Another approach would be to put Apache in front and use mod_headers:
http://httpd.apache.org/docs/1.3/mod/mod_headers.html
http://httpd.apache.org/docs/2.0/mod/mod_headers.html
Note: I've not tried this approach and don't know if you can remove
mandatory headers...
Jon Wingfield wrote
Hi OP,
They probably mean what they say ;)
See the jdk javadocs for the System/Runtime classes.
The Free Memory stat often causes confusion initially. It's the free
memory in the block of RAM currently assigned to the JVM.
So, it looks like at startup Tomcat is assigned 8Mb under your JVM on
Rache,
Tools like ieHTTPHeaders and LiveHTTPHeaders will also help you determine
what the browser actually sends to the server, including any redirects
caused by 302 response codes.
HTH,
Jon
Rache,
But this usually occur after redirects.
This is what I was going to ask about: if you fail
Erm. ok. Where does the redirectURL variable come from? Unless it has
parameters encoded into it that will be your problem.
Also, be a bit wary in using the RequestDumperValve with non-ascii
charset data as it can corrupt some parameters:
If you have a custom error page set up you can trap the 408 response
code and redirect to an appropriate resource. Works for me :)
Alternatively, you can set up a meta refresh on your login page so you
never get the 408. Of course, because the refresh has to go to some
protected page and not
You've also got other candidates such as database connections, JMS
connections etc which could spawn threads (For example, for keep-alive
functionality).
The easiest thing to do is a thread dump (send the process a SIGQUIT
signal) after stopping tomcat to see which thread(s) are keeping the
Quick and dirty solution is to have your login page make a meta refresh
every, say, ten minutes pointing to the index page of your protected
content.
This simple approach works for us. We also catch unexpected errors
coming back from the login form submission and re-present the login
page.
But you need to cater for the people who hit the login page and then go
to lunch. Happens more frequently than you might think ;)
David Smith wrote:
Don't send people who logout to a protected page, forcing a login page
to appear. Better to offer up a public, non-login page and have people
Mark,
Take a look at the LiveHttpHeaders plug-in for Firefox. It may help you
debug this on the client side.
Temporarily enabling the RequestDumperValve on the server side will
enable you to see if cookies are reaching the server.
HTH,
Jon
Aronszajn, Mark wrote:
Thanks for the
The order of events is:
Startup:
All listeners get called.
All filters, load-on-startup servlets get inited.
Shutdown:
All filters, servlets get destroyed.
All listeners get called.
So, it is possible for the combination of load-on-startup init +
contextDestroyed to do the same job as just using
Chuck answered a similar query recently:
http://marc.info/?l=tomcat-userm=118113828210257w=2
Your servlets are serving long-running requests (or are in infinite
loops, dead-locked etc) when you are trying to shutdown tomcat.
The first thing I'd do in this situation is SIGQUIT tomcat to get a
JBuider2006, what profiler can used in JBuider2006?
thanks
peter
On 6/12/07, Jon Wingfield [EMAIL PROTECTED] wrote:
Chuck answered a similar query recently:
http://marc.info/?l=tomcat-userm=118113828210257w=2
Your servlets are serving long-running requests (or are in infinite
loops, dead
PROTECTED] root]#
does anyone has idea why?
some artical said that if JVM set -Xrs,it will ignore the OS signal
like
SIGQUIT
Does anyone know how can i see the stack trace in this situation?
i use Tomcat 5.5.20 in linux , java, 1.5.0_10
thanks
On 6/12/07, Jon Wingfield [EMAIL PROTECTED
57 matches
Mail list logo