Re: crontab problems

2003-02-27 Thread Jon Wingfield
For jdk1.4 you should be able to set the networkaddress.cache.negative.ttl system property to control this. (Assuming the lookups are made using the java.net.* sub-system) http://java.sun.com/j2se/1.4/docs/guide/net/properties.html http://java.sun.com/j2se/1.4.1/networking-relnotes.html We're st

Re: Filter - ServletContext

2003-02-27 Thread Jon Wingfield
Try: sctx.getInitParameter(...) instead of sctx.getAttribute(...) Günter Kukies wrote: Hello, I want to read some context-param from web.xml within a filter. But the getAttribute is always null. There is no problem to get the same context-param within a Servlet. Thanks Günter Here is the c

Re: Performance .. Jsp compile import wildcards

2003-02-27 Thread Jon Wingfield
http://www.javaworld.com/javaworld/javaqa/2001-04/01-qa-0406-import.html Reynir Hübner wrote: Hi, I'm wondering what kind of performance decrease (if any) it has to use wildcards in jsp import lines. example : <%@ page import="java.util.*" %> .. but not : <%@ page import="java.util.ArrayL

Re: locale

2003-02-27 Thread Jon Wingfield
via a static method on java.util.Locale. In your case the Locale call will be Locale.setDefault(new Locale("br", "PT")); You may also want to set the TimeZone in a similar manner. Felipe Schnack wrote: How can i set the default locale of my application? There is a system property to do that? I

Re: Proxy

2003-02-27 Thread Jon Wingfield
try setting the following system properties: *http.proxyHost* *http.proxyPort* http://java.sun.com/j2se/1.4/docs/guide/net/properties.html Alberto A C A S Magalhães wrote: ** Este email assim como os ficheiros que possa ter em an

Re: locale

2003-02-28 Thread Jon Wingfield
And if, for example, you have a UK-en application hosted in a data centre in Germany... Drew Sudell wrote: Yes, but this is an per-instance attribute, isn't it? How could I make it be set in all f Tomcat's VMs? Maybe a java "-D" option? On Thu, 2003-02-27 at 14:38,

Re: Mime-Type

2003-03-03 Thread Jon Wingfield
A compiled jsp is a servlet. The content returned from a servlet can be pretty much anything ;) Most likely the returned content will be text/html Anthony Smith wrote: I did not know where ask to else this question. Is there a mime-type for a jsp? If so, what is it? ---

Re: Objects in JSP PLEASE HELP.

2003-03-04 Thread Jon Wingfield
Given the way your page is currently set up, this should work: EditorContent content = (EditorContent)pageContext.getAttribute("content"); I can't remember exactly how the TagExtraInfo stuff works but have a look at the compiled jsp (the .java src file) in tomcat's work directory. It may ha

Re: Installation - Tomcat 4.1 - Windows 2K

2003-03-04 Thread Jon Wingfield
My dev machine is XP. I haven't set an explicit classpath and everything works fine. So long as JAVA_HOME is set correctly to a JDK installation everything is sweet. Tomcat has all the jars it needs to compile jsp files. I read the link. It says to set the classpath so that DEVELOPERS can compi

Re: Tomcat on WinXP

2003-03-04 Thread Jon Wingfield
Your jdk is installed at c:\jdk1.4.1 but your echo says c:\jdk1.4 Is that a typo? Denise Mangano wrote: Thanks everyone for answering. I changed my JAVA_HOME to c:\jdk1.4.1 and restarted Tomcat. I still get the same error. The exact error in the log file is: Unable to find a javac compiler;com.s

Re: java.lang.NoClassDefFoundError

2003-03-05 Thread Jon Wingfield
Looks like you've using OpenEJB ;) The OpenEJB distro comes with a war file, which looks like it's been expanded to a context by your tomcat install. However, the war file doesn't contain the required OpenEJB jar files (which probably need to be put in common/lib or server/lib). The class file

Re: Problem : Tomcat can't compile a JSP.

2003-03-07 Thread Jon Wingfield
Ah. That rings a bell. You could be running into the problem where for large pages the generated java method _jspService(...) is too long (>32k, i think) and the compilation fails. The use of a lot of custom tags REALLY bumps up the size of the generated java code. In jasper 2 (used in 4.1.x) t

Re: Setting javax.net.ssl.trustStore

2003-03-12 Thread Jon Wingfield
What happens if you also set -Djavax.net.ssl.keyStore=c:\... -Djavax.net.ssl.keyStorePassword=password Mayne, Peter wrote: I have an application running in Tomcat 4.1.18 using JDK 1.4.1 on Windows XP that makes connections to "https://...";. If I add the web server's certificate's CA to JAVA_HO

Re: class not found in application designed for 3.x, running on 4.1.18

2003-03-13 Thread Jon Wingfield
Try changing the filename from jsafe.zip to jsafe.jar. The classloader used for the lib directories only picks up jar files, not zip files. HTH, Jon Seeling Thomas wrote: Hallo, I am using a commercial application which now has a servlet interface in its latest version (Tivoli Framework 4.1).

Re: Running Tomcat on Win XP

2003-03-14 Thread Jon Wingfield
This is a wild stab in the dark but here goes. How much RAM have you got in your XP box? Is the compilation of the jsp/jsps by ant running out of memory? (I think the compilation is out-of-process, but i may be wrong.) If you think you have enough memory then play around with the -Xms and -Xmx

Re: Ejectute a method on an object instance when session is deactivated.

2003-03-17 Thread Jon Wingfield
I think in servlet spec 2.4 there is an event generated just before the session is invalidated. Until then: I implemented a HttpSessionAttributeListener. When a session is about to be invalidated all its attributes are removed. So, if you have an attribute which lasts for the lifetime of the se

Re: Possible to have default classes and taglib includes in JSPs?

2003-03-19 Thread Jon Wingfield
You can do a static include of a page which has your default imports: <%@ include file="/a_load_of_imports.jsp" %> Tim Funk wrote: No - you have to explicitly import the classes and/or taglibs. -Tim Gavin, Rick wrote: Hi all, Does anyone know if you can include classes and taglibs in all jsp

Re: Browser got incomplete html

2003-03-24 Thread Jon Wingfield
Have a look in the tomcat log files. Either catalina.out or localhost_log..txt. I'll bet there's an exception in one of those. If a jsp scriptlet or custom tag throws an uncaught exception Tomcat may not be able to forward to any predefined error pages because part of the response has already been

Re: Scrollable Tomcatserver window

2003-03-26 Thread Jon Wingfield
nope. That'll be an NT, XP, 2000 feature. ;) Set up your web applications to use log4j (or some other logging package). Convert all System.out.println(...), System.err.println(...), e.printStackTrace() calls etc to use the logging. You won't need to look at the DOS window any more. Also, there

Re: PDF over https in MSIE problem

2003-04-02 Thread Jon Wingfield
We had this for content types that IE didn't know about, including application/x-zip-compressed and application/octet By default we have a filter which sets cache headers for everything: httpResponse.setHeader("Cache-Control", "no-cache"); httpResponse.setHeader("Pragma", "no-cache"); For the

Re: open source code and IDE

2003-05-30 Thread Jon Wingfield
You could also take a look at JEdit (www.jedit.org). It's a free, open source java ide that has a community writing plug-ins to do most of the things mentioned in previous posts. :) [EMAIL PROTECTED] wrote: thanks for the replies u got me going , although the IDE looks sweet , similar to PHPEdit

Re: [redirecting startup exception trace to a file]

2003-06-12 Thread Jon Wingfield
adding > out.txt only redirects std out. You need to redirect std err, which in dos, i think, is 2> err.txt so: catalina.bat run > out.txt 2> err.txt should do what you want. Also on windows 2000 you should be able to set the dos window buffer to, say, . Then the exceptions won't scroll off

Re: getting a reply like this.

2003-06-19 Thread Jon Wingfield
I may be wrong but... This list knows nothing (as such) about [EMAIL PROTECTED] Here's what i believe is happening: 1) You post to the list. 2) List delivers said post to all subscribers. One subscriber is, say, [EMAIL PROTECTED] 3) The Mail Daemon/Post Master at logicaonline.com rejects the post

Re: JSPs not compiling

2003-07-10 Thread Jon Wingfield
Ok. Looks like you're running a JRE on Solaris. Jsp compilation requires a JDK installation. As to the "exception above was detected in native code outside the VM" error; have you installed the OS patches required for that version of java? http://java.sun.com/j2se/1.3/install-patches.html Thom

Re: Servlet Context Listener problem...

2003-07-15 Thread Jon Wingfield
Is that the entirety of your web.xml? The error looks like the parser can't find the definition of the "listener" element, it hasn't even got to the point of worrying about element order yet. Have you got an xml prolog and a doctype at the top of the file? eg: "http://java.sun.com/dtd/web-app_

Re: Problems compiling tomcat

2003-07-23 Thread Jon Wingfield
It is finding the jar, otherwise you'd be having a completely different error message. ;) The error implies you are compiling against a different version of the commons-fileupload component than the 4.1.24 src was written against. The 4.1.24 binary release bundled commons-fileupload-1.0-beta-1.j

Re: Session persistance after server restart: a bug?

2003-07-24 Thread Jon Wingfield
Not a bug. Standard behaviour. Chack out the Manager element in the server.xml http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/manager.html If you haven't got a Manager explicitly added in the server.xml a default is used (stores serialized sessions in a file SESSIONS.ser under the work

Re: application scope variable lost

2003-07-28 Thread Jon Wingfield
Even though your Servlet is loaded on startup the container (ie tomcat) is free to unload and reload servlets at any time. This is why it is so much better (IMO) to use ServletContextListeners for application configuration. Does your servlet create empty maps even if they already exist on the c

Re:

2003-01-28 Thread Jon Wingfield
Are you using log4j? If you are then chack out the org.apache.log4j.net.SMPTAppender. It sends a mail each time a message of the required severity is logged. http://jakarta.apache.org/log4j/docs/api/org/apache/log4j/net/SMTPAppender.html example of log4j.properies portion for this appender: lo

Re: servlets

2003-01-28 Thread Jon Wingfield
Problem with serialization: 1) Client asks for singleton from webapp and stores it as an instance variable. 2) Client get serialized to some persistance store (db, jms message queue, whatever) 3) webapp goes away (dies, gets shutdown, whatever) 4) webapp restored 5) Client deserialized. Which ve

Re: about singletons (ot)

2003-01-28 Thread Jon Wingfield
Did someone say Booch utility? http://www.javaworld.com/javaworld/jw-04-1999/jw-04-toolbox.html see page 2. Actually, this entire set of articles on threading is excellent. Felipe Schnack wrote: These days I was thinking It's not so uncommon to have uses for singleton classes in our everyda

Re: java.io.IOException - whats up?

2003-01-29 Thread Jon Wingfield
Just a thought. Have you set your CATALINA_TMPDIR environment variable? Its default value is $CATALINA_BASE/temp which doesn't exist by default ;) klavs klavsen wrote: Hi guys, I've gotten help from John Turner on this problem of mine (where /manager works, and /admin gives me a 404. The error

Re: error page for error code 500?

2003-02-04 Thread Jon Wingfield
If you are trying to generate a 500 by accessing a url outside a context then the error page defined within the context won't get triggered. Where are you putting your error-page tags? You could try altering the web.xml in tomcats conf directory... [EMAIL PROTECTED] wrote: Thank you for the re

Re: Servlet produces HTML .. how do i pass attributes in the sessionobject ?

2003-02-14 Thread Jon Wingfield
According to the j2se javadocs neither keys nor values in a Hashtable can be null. It looks like the variable hs returned from getFruits(...) is null... HTH, Jon Mufaddal wrote: Hi ... in my doPost() I do some processing and then I do HashSet hs = getFruits(userName);

Re: [ot] RE: Bugs, Issues, Tasks, Patches, CVS integration - whichis the best tool

2003-07-29 Thread Jon Wingfield
+1 Reynir Hübner wrote: Scarab. Check out www.tigris.org It's excellent. hope it helps -reynir -Original Message- From: Donie Kelly [mailto:[EMAIL PROTECTED] Sent: 29. júlí 2003 12:55 To: 'Tomcat Users List' Subject: [ot] RE: Bugs, Issues, Tasks, Patches, CVS integration - which is

Re: how to change to Tomcat work directory

2003-07-31 Thread Jon Wingfield
You should be able to set this by modifying your server.xml and all .xml files: Set the "workDir" attribute for your Host (or for the individual Contexts) http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/host.html http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html Set the "

Re: File cannot be download with security-constraint...

2003-07-31 Thread Jon Wingfield
ah the old IE + SSL + cacheing problem ;) Try adding: final String userAgent = request.getHeader("user-agent"); if (response.containsHeader("Pragma") && userAgent!=null && userAgent.toUpperCase().indexOf("MSIE")>-1) { response.setHeader("Pragma", "public"); } Solved it for us. Jon R

Re: File cannot be download with security-constraint...

2003-07-31 Thread Jon Wingfield
Cool. Was just writing a response about the headers tomcat adds when using a security restraint. But you've already worked it out... I've only seen the problem when using IE with SSL + security constraint but i guess it's more of a general problem. :( Jon Rob Tomlin wrote: ah the old IE + SSL

Re: Persistent Sessions

2003-08-05 Thread Jon Wingfield
Your HttpSessionActivationListener must be an object bound to the session. So, in your HttpSessionListener's sessionCreated method add the HttpSessionActivationListener to the session as an attribute. HTH, Jon Kal Govindu wrote: Hi Yoav, Ok, now my listener class implements a HttpSessionActi

Re: Unit Testing

2003-08-07 Thread Jon Wingfield
You could have a look at the MockObjects project on sourceforge. http://mockobjects.sourceforge.net http://mockobjects.sourceforge.net/javadoc/1.4/ All our servlets, filters, DAO code etc are tested using Mocks :) It's great not needing a db or remote connection or even a servlet container when ru

Re: Freeing processors

2003-08-08 Thread Jon Wingfield
Thanks for the info. I should have RTFM ;) Mauricio Nuñez wrote: Hi With RH 8, you can see the threads using the option -m Att Mauricio El Jue 07 Ago 2003 09:17, Jon Wingfield escribió: Yep. Since RH 8 the ps command only shows the main java process. In previous versions ps showed the

Re: external parameters to tomcat (how?)

2003-08-08 Thread Jon Wingfield
erm. can't you just use init parameters in the web.xml: section SRV.2.3.2 in the servlet 2.3 spec. If the location is for one servlet use a servlet init param otherwise use a servlet context init param. In the latter case you can access it in your servlet by doing (for example): String value =

Re: Freeing processors

2003-08-09 Thread Jon Wingfield
Yep. Since RH 8 the ps command only shows the main java process. In previous versions ps showed the parent process and a child process for each thread the java app spawned. The previous behaviour often lead to confusion relating to memory assignment so i guess that's why RH changed it. Personal

Re: How to configure to use tomcat and struts to use log4j?

2003-08-14 Thread Jon Wingfield
Looks like Struts has a dependency on Commons Logging which is using Log4j under the hood. The commons logging jar is being loaded from a "higher" level classloader (common/lib or server/lib) and can't access classes only provided by a "lower" classloader (your webapp). Maybe try having the com

Re: [OT] JDBC confusion

2003-08-14 Thread Jon Wingfield
I agree with Nix, use a connection pool. One connection per user may be ok when you've got, say, 5 concurrent users but when you've got 1000, 1, Not scalable. http://tomcatfaq.sourceforge.net/database.html http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.htm

Re: Custom Tag Lib

2003-08-14 Thread Jon Wingfield
Yikes, calling release() in doStartTag() stops any state being accessible to child (body) tags. That would kill our custom iterator tags. You could have your tags implement the TryCatchFinally interface, instead. That way you'll have a chance to reset state before reuse: http://jakarta.apache.org

Re: cookie problem

2003-08-14 Thread Jon Wingfield
As Andy remarked: the call request.getCookies(); should return null if there are no cookies submitted. This behaviour is specified in the JavaDocs for both the Servlet 2.2 and 2.3 specs. Tomcat 3 was in error and the behaviour has been corrected for Tomcat 4 and later. HTH, Jon Paul wrote: I

Re: Freeing processors

2003-08-14 Thread Jon Wingfield
I think the connectionTimeout parameter controls how long the container waits before giving up on trying to obtain a request processor from the pool. Once the processor has been obtained a runaway/blocked process can stop the processor from being released. One way to get around this would be, fo

Re: Tomcat does not want to compile

2003-08-14 Thread Jon Wingfield
This is a JBuilder problem not a Tomcat problem. The JBuilder JSP compiler (com.borland.jbuilder.webserverglue.tomcat.jsp.JasperSunJavaCompiler from your stacktrace) can't find the tools.jar of your jdk. Is it in the path JBuilder uses to run the embedded Tomcat? Bob Hacker wrote: I am runnin

Re: accessing jsp on tomcat

2003-08-18 Thread Jon Wingfield
That '!' in your code is very important. Remove it. Read Section JSP.2.11 of the JSP spec to see why you need to remove it ;) HTH, Jon Viswanatha Rao wrote: 1. I access jsp as http://localhost:8080/mycode/hello.jsp?firstname=viswa&lastname=rao 2. I have jsp code in my application c:\webdev\hel

Re: shutdown tomcat

2003-08-19 Thread Jon Wingfield
So you added an instance of TestTomcatNotifications to a session as an attribute? That's the only way you'll get HttpSessionActivationListener events. You added a listener element to your web.xml registering TestTomcatNotifications as a HttpSessionListener? On shutdown sessionDestroyed(...) doe

Re: That ever-popular 'wrong version:46, expected 45' message

2003-08-20 Thread Jon Wingfield
The 46 and 45 are magic numbers that the java compiler puts into byte-code. It looks like you are trying to compile with a older (and incompatible) version of javac than the servlet classes were compiled against. I've seen this before when an installation of Oracle added jdk1.1.8 when I was al

Re: Error when I load a file

2003-08-21 Thread Jon Wingfield
I'm sure the stackTrace of the thrown exception would give you more information ;) The code as written would try to load the file myprop.prop from the current working directory. This will be where you executed startup.sh from. If it's not there then you'll probably get a FileNotFoundException.

Re: Suitable Driver Error

2003-08-22 Thread Jon Wingfield
Your url is wrong. Should be: url="jdbc:mysql://localhost:3306/gmds"; The 3306 is the default port mysql accepts connections on. If you've changed it, change your url string. HTH, Jon Luong Phan wrote: Hi all, In my web application, I use mysql supported by Redhat Linux 7.3 to store databas

Re: Tomcat Manager bug ?

2003-09-02 Thread Jon Wingfield
Have you applied the hotfix? http://hillman-family.net/dist/jakarta/tomcat-4/binaries/ EXT / ALTIOR CABOU Carl (DR&T) wrote: Hi all. I used to use the tomcat manager to restart my apps on previous version of tomcat. But since I've moved to tomcat 4.1.27 I get a http 503 error when accessing an a

Re: Counting active sessions if server restarts very often

2003-09-03 Thread Jon Wingfield
When the session is created add an attribute that implements HttpSessionActivationListener. When the server stops the sessionWillPassivate method will be called. When the server restarts the sessionDidActivate method will be called. Use those methods in conjunction with your HttpSessionListene

Re: jdbcodbc database connection problem (access-DB,jsp,tomcat,eclipse)!

2003-09-03 Thread Jon Wingfield
try <%= rs.getString(i) %> instead of <% = rs.getString(i) %> Bruno Armand wrote: Please i try since one week to become this program without error, but without success. Perrhaps can you help me! I write a jsp-file for calling and saving data from an access existing database which i connect with a

Re: jdbcodbc database connection problem (access-DB,jsp,tomcat,eclipse)!

2003-09-03 Thread Jon Wingfield
displayed, but without anything written (from html or database.). Can you know why please? Thank! --- Jon Wingfield <[EMAIL PROTECTED]> schrieb: try <%= rs.getString(i) %> instead of <% = rs.getString(i) %> Bruno Armand wrote: Please i try since one week to become this program

Re: adding a servlet to my webapp

2003-09-03 Thread Jon Wingfield
Given your initial post your class HelloWorld was in jasonTest/WEB-INF/classes/foo So either HelloWorld must be in a package foo. ie the first code line of the Helloworld source is: package foo; or you need to put HelloWorld.class in jasonTest/WEB-INF/classes http://jakarta.apache.org/tomcat/tomc

Re: jdbcodbc database connection problem (access-DB,jsp,tomcat,eclipse)!

2003-09-04 Thread Jon Wingfield
My German's not that good but BabelFish returned the error as "That Data source name was not found, and no standard driver was indicated." So, i guess, your ODBC data source is not set up correctly or you are using the wrong name (maybe case-sensitive). I can't help you with that, i'm afraid, bec

Re: Detail: How to cache the user's input in a jsp page?

2003-09-04 Thread Jon Wingfield
If you want to "remember" the subject when changing the dropdown: Change the definition of your subject text field to: <% String subject = request.getParameter("subject")==null ? "" : request.getParameter("subject");%> And the defintion of your dropdown to: It basically tags the value in th

Re: Restrict access to a webapps folder based on ip

2003-09-09 Thread Jon Wingfield
Tomcat specific: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/valve.html Portable: Write a Filter which accepts/rejects based on the request ip. This could be configured statically through init parameters within web.xml or by JMX (or other means) on the fly ;) caveat: ip addresses can

Re: The function for response.encodeURL....me still not sure

2003-09-10 Thread Jon Wingfield
You don't need to use encodeURL for includes or forwards. These are server side processes and the session has already been determined. The encodeURL tags the *next* client request with the data required to continue a session. HTH, Jon Anson Zeall wrote: Thanks a lot, But..for example...

Re: TC logfiles

2003-09-10 Thread Jon Wingfield
I assume you mean the access logs. Have a look at the contents of /conf/server.xml and look for a Valve element for the access logs. I'm fairly sure you can make the pattern the same as Analog expects. Here's the reference for the Valve config: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/co

Re: Annoying taglib problem

2003-09-10 Thread Jon Wingfield
Put a taglib entry in your web.xml: your_uri_here /WEB-INF/taglib.tld and change your jsp page: <%@ taglib uri="your_uri_here" prefix="ft" %> As per section JSP.7.3.6.3 of the JSP 1.2 specification, available here: http://www.jcp.org/aboutJava/communityprocess/final/jsr053/ Also: h

Re: Annoying taglib problem

2003-09-10 Thread Jon Wingfield
d the same results. I then coded it as it is to eliminate the web.xml from being the problem. --- Jon Wingfield <[EMAIL PROTECTED]> wrote: Put a taglib entry in your web.xml: your_uri_here /WEB-INF/taglib.tld and change your jsp page: <%@ taglib uri="your_uri_here&quo

Re: Simulating HttpSession

2003-09-11 Thread Jon Wingfield
Everything can be Mocked ;) www.mockobjects.com Specifically the com.mockobjects.servlet package http://mockobjects.sourceforge.net/javadoc/1.4/ Christopher Williams wrote: HttpSession is an interface - implement it yourself. - Original Message - From: "Altuğ B. Altıntaş" <[EMAIL PROTECTE

Re: Tomcat + WebStart

2003-09-11 Thread Jon Wingfield
The difference in the HTTP response headers is significant. Tomcat has probably added the Expires, Pragma and Cache-Control headers. Tomcat does this by default if the requested resource is within a security-constraint. The browsers probably abide by the directive not to store the file. You can

Re: Annoying taglib problem

2003-09-11 Thread Jon Wingfield
t-shirt. I moved the DTD from the internet to the below path to fix the problem. Anyone else? --- Jon Wingfield <[EMAIL PROTECTED]> wrote: Oops. Right you are. Didn't read the error message ;( Looks like the taglibs dtd wasn't found. Try http://java.sun.com/dtd/web-jsptagl

Re: Stackoverflow after DB inactivity

2003-09-16 Thread Jon Wingfield
I don't use dbcp but it sounds like your database connections are timing out. Do you have autoReconnect=true in your mysql jdbc connection url? Vikram Goyal wrote: Hello all, I am getting a Stackoverflow error in Tomcat 4.1+ after a period of database inactivity, typically (3+ hours). I am using

Re: Memory Woes

2003-09-16 Thread Jon Wingfield
Once memory has been grabbed by the JVM it is only handed back to the OS once the JVM process quits. You can find out the total and free memory the JVM has by using the Runtime class: Runtime.freeMemory() Runtime.totalMemory() Runtime.maxMemory() Pountain, John (KAZ at Alcoa) wrote: Hi, I have

Re: Query on element of web.xml file ??

2003-09-16 Thread Jon Wingfield
Read chapter 11 of the servlet 2.3 specification. It's all there. The spec is available from here: http://www.jcp.org/aboutJava/communityprocess/final/jsr053/ Bikash Paul wrote: Hi all friends, If my web application's web.xml file contains this: Test Filter /*.jsp then the filter doesn't run w

Re: Specifying content type for file downloads

2003-09-16 Thread Jon Wingfield
Tomcat is serving the static resource using its default servlet? If so, try adding the mime type to the conf/web.xml file: xls application/vnd.ms-excel Doug Chamberlin wrote: I'm using Tomcat 4.06 standalone and cannot find how to configure the server to properly identify downloaded files

Re: powerpoint display

2003-09-17 Thread Jon Wingfield
try ppt application/vnd.ms-powerpoint Luo, Zhongjun wrote: I am trying to let my web site show a powerpoint file. I added the following into Tomcat conf/web.xml, but it does not work (the brower shows strange characters). What should I do? Thanks very much. ppt application/ppt

Re: Desperation! Tomcat crashing inexplicably. :-& Fresh ideas n eeded.

2003-09-18 Thread Jon Wingfield
You could always try Vim on windows. http://www.vim.org/ You'll never use Notepad again (well, maybe ;)) JEdit has a plug-in (LogViewer) that is effectively a GUI tail. http://www.jedit.org Or go the whole hog and install Cygwin for a bash shell with tail, vi and all manner of *nix utilities. ht

Re: Urgent! Cannot start Tomcat - java.lang.OutOfMemoryError

2003-09-19 Thread Jon Wingfield
Most JVMs limit the number of concurrent threads that can be created. That will be the OutOfMemoryError. As to why it is happening: Have you tweaked the server.xml settings for min/maxProcessors? Have you upped things like ulimit before the power outage and are now reset? Denise Mangano wrote:

Re: Init Parameter

2003-09-19 Thread Jon Wingfield
Where in the code are you calling the method. If it's as an instance variable or in the servlet constructor then Tomcat hasn't yet inited the servlet and the getServletConfig() method doesn't behave as you are expecting. Of course, there's always the init(ServletConfig config) method. ;) Maili

Re: Can JSP track users in a basic authentication protected realm ?

2003-09-22 Thread Jon Wingfield
You could possibly track the "referer" header of the request. If the referer is a site outside your protection domain then re-authenticate. This could be done in a filter: Check the header, log out the user, redirect to the requested page to trigger re-authentication. This technique assumes the

Re: Config Error ??

2003-09-22 Thread Jon Wingfield
A config error and a coding error. You've set up a servlet mapping but aren't using it. Instead of using the URI /naccrrajsp/servlet/naccrra.servlets.LoginServlet use /naccrrajsp/Login Then you'll need to add a JKMount for /naccrrajsp/Login HTH, Jon David OBrien wrote: I'm having a bit of a c

Re: How to run a JSP/Servlet Web App on a pc unconnected with internet

2003-09-23 Thread Jon Wingfield
You shouldn't have to change anything. Tomcat has a Catalog of DTDs which it uses in preference to the resource specified in the URL in the public identifier. So long as your webapp doesn't make any other calls to resources on the net you should be good to go. I run our webapp on my laptop quite

Re: Configuring and using cgi scripts in Tomcat

2003-09-23 Thread Jon Wingfield
/resporta/cgi-bin/animal.cgi does not map to /cgi-bin/* I'm guessing "resporta" is the name of your webapp? Where did you place the script? As I read it, you need to put it in /ROOT/WEB-INF/cgi (I could be wrong). HTH, Jon Wilson, Allen wrote: Okay I did all that 1 - Uncommented the

Re: Mail Session oddity

2003-09-26 Thread Jon Wingfield
But mail.jar and activation.jar are also in the common/lib directory. I'll bet it's a ClassLoader issue and the exception is really a wrapped ClassCastException. http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html Jon Cord Awtry wrote: Yo Yaov, Actually, I didn't trun

Re: Unix utils for Windows?

2004-04-02 Thread Jon Wingfield
http://www.cygwin.com/ I'm using grep, tail and scp on windows xp all the time :) I also like gVim on windows. http://www.vim.org/ Shaw, Laurence wrote: Does anyone know where I can find a workable version awk for Windows,( and for that matter most common [U}[Lin]ix utilities) that will run on

Re: Problem with UserTransaction reference within Servlet code.

2004-04-06 Thread Jon Wingfield
The answer's in the question ;) Tomcat is not a J2EE Server but an implementation of the Servlet Specification (which is but a part of the whole J2EE spec). Tomcat's JNDI lookups are in-process only. Need an open source J2EE container? Have a look at JBoss... Hassan Sajjad wrote: Hi Can anyone

Re: Problem with UserTransaction reference within Servlet code.

2004-04-06 Thread Jon Wingfield
/tomcat-4.1-doc/jndi-resources-howto.html Have fun, Jon Hassan Sajjad wrote: Jon Wingfield, thanks for your reply. My application is a Web Application (.war) only, no ejb's etc. However, since I'm using Composite View Pattern (aka Templating), I want different parts to be combined into One

Re: Problem with UserTransaction reference within Servlet code.

2004-04-06 Thread Jon Wingfield
And of course: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html#Tyrex%20Connection%20Pool Although I'm not sure how actively maintained Tyrex is these days. http://sourceforge.net/projects/tyrex/ Jon Jon Wingfield wrote: There is always a way ;) Saw thi

Re: Tomcat Java OutOfMemory Error

2004-04-06 Thread Jon Wingfield
JAVA_OPTS only works for standalone startup not as a service. Found this by googling. http://forum.java.sun.com/thread.jsp?thread=290568&forum=33&message=1211179 Solution is about six down and by user dfortae HTH, Jon shyam wrote: Hi, I not sure about tomcat 3.2.1. In tomcat 4 I have used the J

Re: Where to set JAVA_OPTS

2004-04-07 Thread Jon Wingfield
No need to change the script. I normally set an Environment variable in the same place I define JAVA_HOME Go to Control Panel \ System \ Advanced tab \ Environment variables... Well, that's where it is on XP, which i'm currently running. HTH, Jon Giorgio Ponza wrote: [EMAIL PROTECTED] ha scrit

Re: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Jon Wingfield
I may be way off but... I don't think http://myserver.com/portal maps to /portal/* ajp13 http://myserver.com/portal/ or http://myserver.com/portal/whatever.jsp probably will, though. Give it a go, may work, Jon Wilson, Allen wrote: Bill..thanks for the reply... I will read through the link you

Re: Connecting the HTTP Server and Tomcat

2004-04-07 Thread Jon Wingfield
tell..when I check the running ports I see the 8009 port running but it does not hand to Tomcat -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 07, 2004 2:09 PM To: Tomcat Users List Subject: Re: Connecting the HTTP Server and Tomcat I may be way

Re: Tomcat does not start !

2004-04-20 Thread Jon Wingfield
Download the binary not the source zip: http://jakarta.apache.org/site/binindex.cgi If you execute "catalina run" instead of startup you'll see the error in the same shell. HTH, Jon [EMAIL PROTECTED] wrote: Hi, I have installed Tomcat on my windows machine and set the CATALINA_HOME and JAVA_H

Re: ClassCastException with own Principal interface and implementation

2004-04-22 Thread Jon Wingfield
This is probably a classloader issue. The Realm will load classes from the server classloader. Your webapp will also load the same classes in its own classloader. The two types of CrmPrincipal are not assignable so a ClassCastException results. Try placing the CrmPrincipal class in common/lib a

Re: Pass info between Tomcat Valve and Filter

2004-05-21 Thread Jon Wingfield
An invocation of a Tomcat Valve gives you a Request object. This is a facade to a ServletRequest, which you can access via the getRequest() method. You could set your info object as an attribute on the ServletRequest. This should then be visible to your filter. http://jakarta.apache.org/tomcat/

Re: Pass info between Tomcat Valve and Filter

2004-05-21 Thread Jon Wingfield
m working on... http://web.comlab.ox.ac.uk/oucl/research/areas/softeng/eWLM/ Cheers, Rui On Fri, 21 May 2004, Jon Wingfield wrote: An invocation of a Tomcat Valve gives you a Request object. This is a facade to a ServletRequest, which you can access via the getRequest() method. You could set your info object as

Re: Tomcat logging and the referer

2004-05-28 Thread Jon Wingfield
Extract from the HTTP spec: "The Referer field MUST NOT be sent if the Request-URI was obtained from a source that does not have its own URI, such as input from the user keyboard." http://www.w3.org/Protocols/rfc2616/rfc2616.txt So unless someone links to your index page you'll probably never get a

Re: Illegal Access Error [ URLConnection ]

2003-12-05 Thread Jon Wingfield
Yep. An Error isn't an Exception; it's a Throwable. Inheritance tree: Throwable | -- | | ErrorException HTH, Jon Stuart Stephen wrote: I tried putting a try and catch block around it to catch a the generic Exception. Yet

Re: [OT}RE: directive.include problem

2003-12-08 Thread Jon Wingfield
erm. shouldn't it be: as per section JSP.4.4 of the JSP 1.2 specification. HTH, Jon Atreya Basu wrote: The only problem with the include directive is that it actually outputs the result of a jsp rather than just the text. What I want to do is have some content in a another file, have the two

Re: [OT}RE: directive.include problem

2003-12-08 Thread Jon Wingfield
Oops. Note to self: must read JSP2.0 spec ;) (specifically JSP.6.2.4) Jon Wingfield wrote: erm. shouldn't it be: as per section JSP.4.4 of the JSP 1.2 specification. HTH, Jon Atreya Basu wrote: The only problem with the include directive is that it actually outputs the result of

Re: How to prevent direct access to login.jsp

2003-12-09 Thread Jon Wingfield
Tomcat 4.0.x, 4.1.x does a redirect to the login page specified in the web.xml Tomcat 5 does a forward so the login page url never reaches the browser. There are a number of workarounds/hacks in the archives for tc4. eg the thread "j_security_check - Bookmarking the login page. A teaser!" Jon Ja

Re: [SPAM] Re: Testing servlet for thread safety.

2003-12-09 Thread Jon Wingfield
OTOH: http://jakarta.apache.org/cactus/index.html http://jakarta.apache.org/commons/latka/ http://jakarta.apache.org/jmeter/index.html http://www.mockobjects.com/wiki/SimpleServletTest Jon Antony Paul wrote: Subject: Re: Testing servlet for thread safety. From: "Antony Paul" <[EMAIL PROTECTED]>

  1   2   3   >