Tomcat 6.0.26. Crite ria for '400 bad req uest' using MutiThre ading‏
What is the criteria for send a BAD REQUEST (400) using extensively Mutithread bulk calculation (50 per time) from TOMCAT with SQLSERVER? For extensively, I understand as constantly and many times. Server: CPU 2GHz 4 cores, Mem 8GB, (Linux Server K2.6.16.20 SMP) Thanks for any help. Best Regards. M.Eng. Felipe Maya _ Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us
Problems installing Jakarta Isapi Redirector
Hi, I'm trying to install and configure Jakarta Isapi Redirector on a Windows Server 2003 machine with IIS 6.0 and many ASP.Net web sites deployed and working on it. Also, this server redirects some URLs to a J2EE application deployed under WebSphere 6.0 (using a ISAPI filter) that is installed on a different server. I'm needing the redirection because my workgroup is developing a J2EE application that will be deployed on a different machine with Windows Server 2003 and Apache Tomcat 6.0 installed. When I configure the redirector (configuration files workers.properties, uriworkermap.properties, virtual directory in IIS (jakarta), registering the ISAPI Module, allow execution of ISAPI filters in IIS) and i'm trying to enter to the mapped URL in a browser, the response from the IIS Server is an Internal Server Error (500 Error), but i don't know what's the reason of the problem. I tried to view the logs but there are no related information about the error. I tried mounting 3 different scenarios, with sucess: 1. A machine running Windows XP and Tomcat 6.0 (with the deployed application), and another machine running Windows XP and IIS 5.0 (using the Jakarta Redirector). 2. A machine running Windows Server 2003 and Tomcat 6.0 (with the deployed application), and another machine running Windows XP and IIS 5.0 (using the Jakarta Redirector). 3. A machine running Windows Server 2003 and Tomcat 6.0 (with the deployed application), and another machine running Windows Server 2003 with IIS 6.0 (using the Jakarta Redirector as the only ISAPI Filter installed). The second machine had only one ASP.Net application running on it. So, I'm thinking that the problem is related with the use of WebSphere ISAPI Filter and Jakarta ISAPI Redirector at same time, but i wish to know what is the reason of the problem, and if exists a solution for that. Any help would be appreciated. Thanks. Carlos.
Vista woes....
hi, am trying to get Tomcat to run in Vista, have dl'd and installed Tomcat 5.5.23 set necessary vars thus: JAVA_HOME=C:\Java\jdk1.5.0_12 JRE_HOME=C:\Java\jdk1.5.0_12\jre but when try to run a webapp I get a 404 (even tomcat-docs doesn't run..) I know how to set up Tomcat, have done it before.. I'm wondering if I'm missing anything, but apart from setting up these two env vars I can't think of anything else right now... (path to compiler is set correctly, I can compile stand-alone classes..) for Tomcat I have set CLASSPATH thus: set CLASSPATH=.;apache-tomcat-5.5.23\common\lib\servlet-api.jar;apache-tomcat- 5.5.23\common\lib\jsp-api.jar (usu., at the advice of folks in the java group, I don't set classpath, and never have problems.. but set it now to see if it would help.. Tomcat is not compiling any JSPs, when I go to 'work' dir there are no src files or classes for the JSPs..) thank you.. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: accessing files/dirs.....
yes I know, eventually I want to do this whole webapp in struts.. for now just want to be able to count how many images in 'images' folder.. (what I don't get here is first line.. where does the reqParameter come from? (this method is usu. used to get params from request (user input, query string, etc..) so don't get where directory is coming from here..) thank you very much.. David Smith wrote: Ok... I think I'm starting to see the picture here. You want to be able to write a jsp that can list the directory contents of a folder. This is very crude, no error checking, untested, etc. but you'll catch on ul % String reqParameter = request.getParameter( directory ) ; URI dirURI = this.getServletContext().getResource( reqParameter ).toURI() ; File dirFile = new File( dirURI ) ; if ( dirFile.isDirectory() ) { String[] fileList = dirFile.list() ; for ( int index = 0; index fileList.length; index++ ) { out.println( li + fileList[ index ] + /li ) ; } } % /ul And it does comply with the servlet spec. --David maya wrote: thank you.. someone in another forum said the same thing.. problem is, if I have trouble accessing directory, how will I tell these methods to get Resource for that dir? :) (also, alas, don't quite remember how to use methods of interfaces -- since interfaces can't be instantiated, didn't find getInstance() method for this interface.. but well, can look this up elsewhere, I suppose:) thank you... David Smith wrote: I'm not sure what you're attempting to do here, but have you thought about ServletContext.getResource() and ServletContext.getResourceAsStream() ? Both are safe methods of reading resources from the webapp whether it be in a compressed archive or not. There is also getRealPath(), but it will only work if the webapp is expanded (ie not a .war file). I can't recommend it enough -- read the servlet spec. It really does help. --David maya wrote: File dir = new File(C:\\apache-tomcat-5.5.17\\webapps\\india\\delhi\ \images); this works fine in my machine locally, but on my website.. if, say, I'm in dir where 'images' dir is, this doesn't work... File dir = new File(images) starting @ root of webapp also doesn't work... File dir = new File(/india/delhi/images); names of directors are good, they are all lowercase... have conditional to test... if (imgsList == null) out.println(null); always prints 'null' on my website... do paths in this constructor have to be absolute? so on my website path would have to start with http...? is this an access problem? if so, do I need to ask my webhosting folks? I know this is not a very kosher way of doing it, but am running this code in a JSP for now (still don't know enough struts and such to do this kind of stuff in a stand-alone class.. but of course eventually will have to.. all I want to do is count how many images are in 'images' dir.. that's it..) thank you... - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: accessing files/dirs.....
ok, I asked webhosting guy, this is what finally worked: /chroot/home/myuid/mydomain/tomcat/webapps/india/delhi/images :) many thanks for yr help... David Smith wrote: What I posted was an excerpt from a jsp page writing the index of a folder -- no Struts in sight. directory was just an arbitrary request parameter for example purposes: http://localhost:8080/myWebApp/imageList.jsp?directory=%2fsome%2fdirectory It doesn't really matter how you get that string. In your case, you don't even need the for loop -- just write the count or store it in the pageContext for later use in a tag like c:out value=${fileCount} / For getting the count of files, just replace the contents of the if (dirFile.isDirectory()) block with this one statement: pageContext.setAttribute( fileCount, dirFile.list().length ) ; And then you can write it out later using the c:out tag as above or %=pageContext.getAttribute( fileCount )% --David maya wrote: yes I know, eventually I want to do this whole webapp in struts.. for now just want to be able to count how many images in 'images' folder.. (what I don't get here is first line.. where does the reqParameter come from? (this method is usu. used to get params from request (user input, query string, etc..) so don't get where directory is coming from here..) thank you very much.. David Smith wrote: Ok... I think I'm starting to see the picture here. You want to be able to write a jsp that can list the directory contents of a folder. This is very crude, no error checking, untested, etc. but you'll catch on ul % String reqParameter = request.getParameter( directory ) ; URI dirURI = this.getServletContext().getResource( reqParameter ).toURI() ; File dirFile = new File( dirURI ) ; if ( dirFile.isDirectory() ) { String[] fileList = dirFile.list() ; for ( int index = 0; index fileList.length; index++ ) { out.println( li + fileList[ index ] + /li ) ; } } % /ul And it does comply with the servlet spec. --David maya wrote: thank you.. someone in another forum said the same thing.. problem is, if I have trouble accessing directory, how will I tell these methods to get Resource for that dir? :) (also, alas, don't quite remember how to use methods of interfaces -- since interfaces can't be instantiated, didn't find getInstance() method for this interface.. but well, can look this up elsewhere, I suppose:) thank you... David Smith wrote: I'm not sure what you're attempting to do here, but have you thought about ServletContext.getResource() and ServletContext.getResourceAsStream() ? Both are safe methods of reading resources from the webapp whether it be in a compressed archive or not. There is also getRealPath(), but it will only work if the webapp is expanded (ie not a .war file). I can't recommend it enough -- read the servlet spec. It really does help. --David maya wrote: File dir = new File(C:\\apache-tomcat-5.5.17\\webapps\\india\\delhi\ \images); this works fine in my machine locally, but on my website.. if, say, I'm in dir where 'images' dir is, this doesn't work... File dir = new File(images) starting @ root of webapp also doesn't work... File dir = new File(/india/delhi/images); names of directors are good, they are all lowercase... have conditional to test... if (imgsList == null) out.println(null); always prints 'null' on my website... do paths in this constructor have to be absolute? so on my website path would have to start with http...? is this an access problem? if so, do I need to ask my webhosting folks? I know this is not a very kosher way of doing it, but am running this code in a JSP for now (still don't know enough struts and such to do this kind of stuff in a stand-alone class.. but of course eventually will have to.. all I want to do is count how many images are in 'images' dir.. that's it..) thank you... - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
accessing files/dirs.....
File dir = new File(C:\\apache-tomcat-5.5.17\\webapps\\india\\delhi\ \images); this works fine in my machine locally, but on my website.. if, say, I'm in dir where 'images' dir is, this doesn't work... File dir = new File(images) starting @ root of webapp also doesn't work... File dir = new File(/india/delhi/images); names of directors are good, they are all lowercase... have conditional to test... if (imgsList == null) out.println(null); always prints 'null' on my website... do paths in this constructor have to be absolute? so on my website path would have to start with http...? is this an access problem? if so, do I need to ask my webhosting folks? I know this is not a very kosher way of doing it, but am running this code in a JSP for now (still don't know enough struts and such to do this kind of stuff in a stand-alone class.. but of course eventually will have to.. all I want to do is count how many images are in 'images' dir.. that's it..) thank you... - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: accessing files/dirs.....
thank you.. someone in another forum said the same thing.. problem is, if I have trouble accessing directory, how will I tell these methods to get Resource for that dir? :) (also, alas, don't quite remember how to use methods of interfaces -- since interfaces can't be instantiated, didn't find getInstance() method for this interface.. but well, can look this up elsewhere, I suppose:) thank you... David Smith wrote: I'm not sure what you're attempting to do here, but have you thought about ServletContext.getResource() and ServletContext.getResourceAsStream() ? Both are safe methods of reading resources from the webapp whether it be in a compressed archive or not. There is also getRealPath(), but it will only work if the webapp is expanded (ie not a .war file). I can't recommend it enough -- read the servlet spec. It really does help. --David maya wrote: File dir = new File(C:\\apache-tomcat-5.5.17\\webapps\\india\\delhi\ \images); this works fine in my machine locally, but on my website.. if, say, I'm in dir where 'images' dir is, this doesn't work... File dir = new File(images) starting @ root of webapp also doesn't work... File dir = new File(/india/delhi/images); names of directors are good, they are all lowercase... have conditional to test... if (imgsList == null) out.println(null); always prints 'null' on my website... do paths in this constructor have to be absolute? so on my website path would have to start with http...? is this an access problem? if so, do I need to ask my webhosting folks? I know this is not a very kosher way of doing it, but am running this code in a JSP for now (still don't know enough struts and such to do this kind of stuff in a stand-alone class.. but of course eventually will have to.. all I want to do is count how many images are in 'images' dir.. that's it..) thank you... - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
downloading JSTL..
hi, am a bit confused about JSTL.. when on this pg, http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html it says, about half-way down, Download the Standard Tag Library Release from an Apache Jakarta Project Mirror when I click on Apache Jakarta Project Mirror I get taken to http://jakarta.apache.org/site/downloads/index.html don't know what I'm supposed to download from this page... I click on taglibs get taken to a page with yet another long list.. http://jakarta.apache.org/site/downloads/downloads_taglibs.html.. what do I download here? I thought JSTL meant all taglibs in one package.. thank you.. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: downloading JSTL..
Wendy Smoak wrote: On 8/21/06, maya [EMAIL PROTECTED] wrote: I click on taglibs get taken to a page with yet another long list.. http://jakarta.apache.org/site/downloads/downloads_taglibs.html.. what do I download here? I thought JSTL meant all taglibs in one package.. From that page you either want Standard 1.0 or Standard 1.1, depending on what version of JSTL you want to use (which depends on what version of the Servlet spec you're configuring your webapp for.) In general, Tomcat 5 - Servlet 2.4 - JSTL 1.1 Tomcat 4 - Servlet 2.3 - JSTL 1.0 (However, Tomcat 5 can run apps written to earlier versions of the servlet spec, so check your web.xml to see what version you're *really* using.) And no, JSTL isn't all the taglibs, it's the Standard taglib and there are lots of other ones, as you can see from that page. (And those are only the ones distributed by the Jakarta Taglib project.) HTH, yes, that helped, thank you very much... I managed to figure out which one to download here, http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi followed all instructions in my book (created webapp jstltest, created web.xml acc. to instructions, put .tld's where they belong, plus the jars (jstl.jar, standard.jar, which I put in tomcat/common/lib (I usu. put all jars in tomcat/common/lib, but in this case put also in jstltest/WEB-INF/lib because am getting error as described below, just in case, but that did not help..).. created test.jsp, as instructed (contains just %@ taglib uri=http://java.sun.com/jstl/core; prefix=c% c:out value=Congratulations, JSTL is working!/ ) however, when start tomcat, get this error for this webapp: INFO: Installing web application at context path /jstltest from URL file:C:\tomcat\webapps\jstltest Aug 21, 2006 9:31:38 PM org.apache.commons.digester.Digester fatalError SEVERE: Parse Fatal Error at line 3 column 6: The processing instruction target matching [xX][mM][lL] is not allowed. org.xml.sax.SAXParseException: The processing instruction target matching [xX][mM][lL] is not allowed. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) at org.apache.xerces.impl.XMLScanner.scanPIData(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanPIData(Unknow n Source) at org.apache.xerces.impl.XMLScanner.scanPI(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch (Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkn lots more... pls what does this mean? don't get this... get this error only for this webapp.. all other webapps working fine.. thank you very much... - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: downloading JSTL..
Wendy Smoak wrote: On 8/21/06, maya [EMAIL PROTECTED] wrote: yes, that helped, thank you very much... I managed to figure out which one to download here, http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi ... so you're using JSTL 1.1 followed all instructions in my book (created webapp jstltest, created web.xml acc. to instructions, put .tld's where they belong, plus the jars (jstl.jar, standard.jar, which I put in tomcat/common/lib (I usu. put all jars in tomcat/common/lib, In general, unless you have a good reason to use the common/shared directories, placing jars *only* in WEB-INF/lib is a better choice. but in this case put also in jstltest/WEB-INF/lib because am getting error as described below, just in case, but that did not help..).. created test.jsp, as instructed (contains just %@ taglib uri=http://java.sun.com/jstl/core; prefix=c% c:out value=Congratulations, JSTL is working!/ ) That isn't the right uri for JSTL 1.1. It should be: %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % however, when start tomcat, get this error for this webapp: I think you're mixing and matching Servlet and JSTL versions incorrectly. What are the first few lines of your web.xml? There are some notes here to help people sort out which version of JSTL to use... ignore the Struts-related parts and see if it helps: http://wiki.apache.org/struts/StrutsAndJSTL HTH, Wendy, thank you very much for your help.. I'm using Tomcat 5, so I figured had to use JSTL 1.1.. first lines of web.xml are as follows: ?xml version=1.0? web-app xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; version=2.5 (as per instructions in book..) my Servlet API is 2.4.. so looking on pg you pointed out, put this on top of web.xml: web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 also changed URI for JSTL 1.1 like you said, so now in JSP have: %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % c:out value=Congratulations, JSTL is working!/ still, get exact same error.. oh brother, I don't get this.. (actually the guy says in book he's using Tomcat 5.5 (which I know is for java sdk 1.5, I'm using tomcat 5.0.23 or something, and sdk 1.4, but since am on Tomcat 5 figured JSTL 1.1 would be ok..) (this pg refers to Struts, though.. I'm not using Struts, have never used Struts.. ) again, thank you very much.. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: downloading JSTL..
Wendy Smoak wrote: Wendy, thank you very much for your help.. I'm using Tomcat 5, so I figured had to use JSTL 1.1.. No. The version of JSTL to use depends on what version of the Servlet spec your webapp is configured to use, not what version of Tomcat they're running in. my Servlet API is 2.4.. so looking on pg you pointed out, put this on top of web.xml: web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 also changed URI for JSTL 1.1 like you said, so now in JSP have: %@ taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c % c:out value=Congratulations, JSTL is working!/ still, get exact same error.. oh brother, I don't get this.. The error you're getting has to do with parsing an XML file, probably web.xml. It's complaining that: SEVERE: Parse Fatal Error at line 3 column 6: The processing instruction target matching [xX][mM][lL] is not allowed. Delete the two lines above, and any spaces before, the ?xml version=1.0? (or similar) which is on line 3. It has to be the very first thing in the file. (actually the guy says in book he's using Tomcat 5.5 (which I know is for java sdk 1.5, I'm using tomcat 5.0.23 or something, and sdk 1.4, but since am on Tomcat 5 figured JSTL 1.1 would be ok..) Yes, it should be fine. (this pg refers to Struts, though.. I'm not using Struts, have never used Struts.. ... which is why I said, Ignore the Struts-related parts. :) oh my gosh, I don't believe it!! that's what it was!! I had blank lines at top of web.xml.. I have been using Tomcat for 2 years now, have tons of webapps in there, and I didn't know this.. go figure... (of course I looked @ web.xml's for other webapps.. they all have no blank lines..) thank you so much.. always learn something new. (sigh.. ;) - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Win Server 2003?
thank you.. I just asked because searching for sthg like 'tomcat windows 2003 server' came across a post somewhere where they talk about running Tomcat under IIS.. (http://www.junlu.com/msg/77407.html) so when I saw this I thought maybe in Win Server 2003, since it's kind of geared -- I think -- towards asp.NET development, you can only run it in conjunction with IIS.. but I don't want that.. I want to be able to run it as a stand-alone server, just like I did in Windows 2000.. thanks again.. David Smith wrote: Can it be installed on Win 2003 Server? Yes. Can't find any ref's? Probably because it's built in Java and as such is intended to be platform independent. Take a look at the downloads page -- there is a download that installs it as a service. --David maya wrote: can Tomcat be installed in Windows Server 2003? I have searched for ref's to Windows Server 2003 on tomcat's site (http://tomcat.apache.org/) but found nothing.. thanks.. -m - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]