Re: Example build.xml error?
On 10/10/05, René Schade [EMAIL PROTECTED] wrote: Hi List, Starting a new project, I deceided to move to Tomcat 5.5. In the Application Developer's Guide http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/index.html There is an example build.xml file for installing reloading the project, a basic build-file: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/build.xml.txt Using this build.xml file works fine, except for one thing. Whenever I do a change followed by ant reload, it does not deploy the changes to the server. The changed files are recompiled in to the local /build folder, followed by a reload of the server, but the changed files are never deployed to the server. It should be that class files are not compiled to Tomcats applications WEB-INF\classes folder. You can check this by comparing timestamps of a modified class file. Perhaps you have to make property build.home point to the application context directory of Tomcat. ie. something like property name=build.homevalue=${catalina.home}/myapp/ -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: newbee question on servlet and html
On 10/11/05, Developer Developer [EMAIL PROTECTED] wrote: I wrote my first html and servlet and deployed it on tomcat 5.5. The html works okay when i call it from the browser. The servlet too works okay when i call its doget() method by invoking it from the browser. EG:. http://localhost:8080/VBeer/BeerSelect However, when i try to invoke the servlet from an html form I get a message box - (file download security warning) - Do you want to save this file, with a funny number suffixed to the my servlet name. Not sure what is happening. Here is my HTML code snippet. body h1 align =3D centerBeer selecton Page /h1 form method=3DPOST action=3DBeerSelect what is this 3D before POST ? -- rgds Anto Paul - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Getting Apache2 forwarding to tomcat5
I believe that SuSE does not supply JK2, but only JK. And as another poster said, JK2 is now deprecated. I got the RPM apache2-jakarta-tomcat-connectors working pretty easily as I remember. I moved from the RPM to a newer compiled version of JK version 1.2.14 a couple of months ago to get newer features and better load balancing. HTH - Richard -Original Message- From: Dan Chesmore [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 4:22 PM To: Tomcat Users List Subject: Getting Apache2 forwarding to tomcat5 I have read about 25 different websites on getting this setup. I have read through this list trying to find the answer I need. I have spent the last 2 days and soon 3rd day trying to get this working. I need Apache to forward port 80 and 443 requests to tomcat to 8080 and 8443. I am working on the non-ssl right now. I get an error in Apache error_log saying: [error] uriEnv.init() map to invalid worker /*.jsp-0 ajp13:localhost:8009 [error] uriEnv.init() map to invalid worker /patientC onnect-1 ajp13:localhost:8009 Let me give a bit of history and config files. This is running on SLES9 x86-64 version. Apache and tomcat and the connectors are from RPMs that came with SuSE. Everything is installed in SuSE default install location. httpd.conf.local: LoadModule jk2_module /usr/lib64/apache2/mod_jk2.so Location /*.jsp JkUriSet worker ajp13:localhost:8009 /Location Location /patientConnect JkUriSet worker ajp13:localhost:8009 /Location workers2.properties: [logger] level=DEBUG [config:] file=/etc/apache2/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=1 [shm] info=Scoreboard. Required for reconfiguration and status with multiprocess serve rs file=/usr/share/tomcat/logs/jk2.shm size=1048576 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 [status:] info=Status worker, displays runtime informations [uri:patientconnect.truchart.com/jkstatus/*] info=Display status information and checks the config file for changes. group=status: [channel.socket:localhost:8009] info=Ajp13 forwarding over socket # Define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:patientconnect.truchart.com/patientConnect/*] info=patientConnect Both the workers2.properties and the httpd.conf.local are located in /etc/apache2 directory. In the /usr/share/tomcat/conf/ directory is the jk2.properties and the server.xml jk2.properties: ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED ## WHEN YOU EDIT THE FILE. ## COMMENTS WILL BE _LOST_ ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc. # Set the desired handler list # handler.list=apr,request,channelJni # # Override the default port for the socketChannel channelSocket.port=8009 # Default: # channelUnix.file=${jkHome}/work/jk2.socket # Just to check if the the config is working # shm.file=${jkHome}/work/jk2.shm # In order to enable jni use any channelJni directive # channelJni.disabled = 0 # And one of the following directives: # apr.jniModeSo=/opt/apache2/modules/mod_jk2.so # If set to inprocess the mod_jk2 will Register natives itself # This will enable the starting of the Tomcat from mod_jk2 # apr.jniModeSo=inprocess and the server.xml that was modified: !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector port=8080 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / !-- Note : To disable connection timeouts, set connectionTimeout value to 0 -- !-- Note : To use gzip compression you could set the following properti es : compression=on compressionMinSize=2048 noCompressionUserAgents=gozilla, traviata compressableMimeType=text/html,text/xml -- !-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -- !-- Connector port=8443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS / -- !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 / !-- Define a Proxied HTTP/1.1 Connector on port 8082 -- !-- See proxy documentation for more information about using this. -- !-- Connector port=8082 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false acceptCount=100 debug=0 connectionTimeout=2 proxyPort=80 disableUploadTimeout=true / -- ... !-- Logger shared by all Contexts
RE: Tomcat 5.5.12 and user-agent header
Mark, Thanks - should have thought of that first. Now that I turned on LiveHTTPHeaders, I cannot get it to fail. I was able to do this consistently before. Just to be sure, I'll try again tomorrow morning. Maybe its just late. Thanks much - Richard -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 6:14 PM To: 'Tomcat Users List'; [EMAIL PROTECTED] Subject: RE: Tomcat 5.5.12 and user-agent header Have you looked at the headers between Tomcat and your UA? Is your UA actually sending the UA header? If it is then it looks like a sitemesh problem from what you have described. There are a range of tools for looking at headers. livehttpheaders is good, as is TcpMon which is distributed as part of Axis. Mark -Original Message- From: Richard Mixon [mailto:[EMAIL PROTECTED] Sent: Monday, October 10, 2005 12:00 AM To: 'Tomcat Users List' Subject: RE: Tomcat 5.5.12 and user-agent header Leon, Thank you for the test - but I still get a null user-agent right after the login. Here is a snippet of my code: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; %@ include file=/common/taglibs.jspf% %@ page import=com.ltoj.common.Constants % html:html locale=true head %@ include file=/common/meta.jspf % titledecorator:title//title script type=text/javascript src=c:url value='/scripts/environment.js'//script script type=text/javascript src=c:url value='/scripts/util.js'//script script type=text/javascript src=c:url value='/scripts/helptip.js'//script script type=text/javascript src=c:url value='/scripts/tabs.js'//script script type=text/javascript src=c:url value='/scripts/CalendarPopup.js'//script script type=text/javascript src=c:url value='/scripts/chartWizard.js'//script link rel=stylesheet type=text/css media=all href=c:url value='/styles/default.css'/ / link rel=stylesheet type=text/css media=all href=c:url value='/styles/messages.css'/ / link rel=stylesheet type=text/css media=all href=c:url value='/styles/tabs.css'/ / decorator:head/ % String _userAgent = request.getHeader(user-agent); out.write(USER-AGENT='+_userAgent+'); ... Here's the sequence: 1) I issue a request to this page. 2) CMA says oh, that's protected and shows my custom login page. I get user-agent displayed fine: USER-AGENT='Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7' 3) But on the next page (the original target page of the request), user-agent shows as null. USER-AGENT='null' I can refresh the page or go to any other page in my application and the user agent is fine again. The only thing a bit non-standard about this JSP page is that it is a SiteMesh decorator page. If I run the same test, same pages in Tomcat 5.5.9 I never get user-agent of null. Our application does check the user-agent header a good bit. We use Select lists with option groups - but some browsers do not support this so we simulate it by indenting the select options ourselves. Luckily all of this activity happens well after the initial login - so we are safe, now that I changed the decorator to make sure user-agent is not null before doing anything with it. But it seems other applications might be affected by this - no? Thanks again - Richard -Original Message- From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: Sunday, October 09, 2005 1:45 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: Tomcat 5.5.12 and user-agent header Hmm, I downloaded 5.5.12 and tried the agent-header specific code with it: public void processLogin(User user, HttpServletRequest req, HttpServletResponse res) { StringBuffer info = new StringBuffer(); info.append(login ); info.append(user.getUserName()); info.append( [); info.append(user.getUserId().getPlainPresentation()); info.append(] ); info.append(user.getEmail()); info.append( ); info.append(UserHelper.getGenderDescription(user.getGender())); info.append( ); info.append(UserHelper.getStatusDescription(user.getMembership Status())); info.append( ); info.append(req.getRemoteAddr()); info.append( / ); info.append(req.getRemoteHost()); info.append( Agent: ); info.append(req.getHeader(user-agent)); log.info(info); } outcome was: 2005-10-08 15:36:50,453 INFO - login leon [6] [EMAIL PROTECTED] male premium 127.0.0.1 / 127.0.0.1 Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.8 which I think was same behaviour as before. I took tomcat out of the box (5.5.12 tar.gz)
dynamical class loading
can somone give me an information? I want to know if it is possible to past and load classes into web-inf/classes path without beeing forced to reload the whole webapp ? _ 10 Mo pour vos pièces jointes avec MSN Hotmail ! http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: dynamical class loading
this is a complex answer that *probably* only the Tomcat devs can answer of someone knowledgable about the JVM and class loaders, so don't expect too many users to answer. i believe from my limited knowledge that you cannot reload single classes in a tomcat web application as a whole class loader is associated with a web application. i believe the problem is more to do with the JVM although I *believe* WebLogic manages it. perhaps if a dev has time to explain they will. Allistair. -Original Message- From: dumbQuestionsAsker _ [mailto:[EMAIL PROTECTED] Sent: 12 October 2005 09:11 To: tomcat-user@jakarta.apache.org Subject: dynamical class loading can somone give me an information? I want to know if it is possible to past and load classes into web-inf/classes path without beeing forced to reload the whole webapp ? _ 10 Mo pour vos pièces jointes avec MSN Hotmail ! http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK Disclaimer: The information contained within this e-mail is confidential and may be privileged. This email is intended solely for the named recipient only; if you are not authorised you must not disclose, copy, distribute, or retain this message or any part of it. If you have received this message in error please contact the sender at once so that we may take the appropriate action and avoid troubling you further. Any views expressed in this message are those of the individual sender. QAS Limited has the right lawfully to record, monitor and inspect messages between its employees and any third party. Your messages shall be subject to such lawful supervision as QAS Limited deems to be necessary in order to protect its information, its interests and its reputation. Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS Limited cannot guarantee that attachments are virus free or compatible with your systems and does not accept any liability in respect of viruses or computer problems experienced. /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: serving content from outside the context
John Laughton wrote: Hi, I hope this is the right mailing list for this question I am using tomcat 5.0.28 I have a simple web app and want to serve up some images in the jsp pages, but the images are outside the context The HTTP statement looks like trtd img alt=thumb image src=/data/webData/family/DSC01183.JPG/ /td/tr The web app is under /usr/local/tomcat/webapp/family On the browser it only shows thumb image as it cannot get to the hyperlink http://xx.xx.xx.xx/data/webData/family/DSC01183.JPG (IP shown as xx.xx.xx.xx for security) I have read a lot about tomcat and figure there must be a way to configure server.xml and/or web.xml to allow this to work, but cannot see it ? It is possible ? Are you wanting TC to serve the static files or do you use AJP connector and Apache. The easiest way to serve files from outside is to let Apache serve them and configure up AJP connector, then mount the entire content or just *.jsp pages to TC. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: More helpful reporting of exceptions in JSPs
Tim Fennell wrote: I've posted my patch for Jasper/Tomcat at the following location: http://www.tfenne.com/jasper/ The page has a brief overview, a download link and before and after screenshots so you can get an idea for what exactly the patch does before you decide to patch your own environment. If you give it a shot and have any problems and/or suggestions for improving it please let me know - but please read the readme first ;) Excellent addition. Maybe once you have got an initial around of feedback for users of the latest 5.0.x and 5.5.x you might like to post it up on Tomcat Bugzilla http://issues.apache.org/bugzilla/enter_bug.cgi?product=Tomcat%205 and attach the patch. Darryl - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: dynamical class loading
Thank you for your answer. You told me that it has more to deal with JVM, I tried using a URLClassLoader unsuccessfully, that's why I asked. Have a nice day(or night). @++ From: Allistair Crossley [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: Tomcat Users List tomcat-user@jakarta.apache.org Subject: RE: dynamical class loading Date: Wed, 12 Oct 2005 09:16:12 +0100 this is a complex answer that *probably* only the Tomcat devs can answer of someone knowledgable about the JVM and class loaders, so don't expect too many users to answer. i believe from my limited knowledge that you cannot reload single classes in a tomcat web application as a whole class loader is associated with a web application. i believe the problem is more to do with the JVM although I *believe* WebLogic manages it. perhaps if a dev has time to explain they will. Allistair. -Original Message- From: dumbQuestionsAsker _ [mailto:[EMAIL PROTECTED] Sent: 12 October 2005 09:11 To: tomcat-user@jakarta.apache.org Subject: dynamical class loading can somone give me an information? I want to know if it is possible to past and load classes into web-inf/classes path without beeing forced to reload the whole webapp ? _ 10 Mo pour vos pièces jointes avec MSN Hotmail ! http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK Disclaimer: The information contained within this e-mail is confidential and may be privileged. This email is intended solely for the named recipient only; if you are not authorised you must not disclose, copy, distribute, or retain this message or any part of it. If you have received this message in error please contact the sender at once so that we may take the appropriate action and avoid troubling you further. Any views expressed in this message are those of the individual sender. QAS Limited has the right lawfully to record, monitor and inspect messages between its employees and any third party. Your messages shall be subject to such lawful supervision as QAS Limited deems to be necessary in order to protect its information, its interests and its reputation. Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS Limited cannot guarantee that attachments are virus free or compatible with your systems and does not accept any liability in respect of viruses or computer problems experienced. /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Une chance par jour de gagner un voyage au soleil avec Magic Search ! http://www.magicsearch.fr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: serving content from outside the context
Or if you don't want to do what Darryl is suggesting you can configure your tomcat to use unix symlinks by setting the allowLinking attribute to true. Then you can simply create a softlink inside your webapp directory that points to your data directory. That will work as well. Arup -Original Message- From: Darryl L. Miles [mailto:[EMAIL PROTECTED] Sent: 12 October 2005 09:59 To: Tomcat Users List Subject: Re: serving content from outside the context John Laughton wrote: Hi, I hope this is the right mailing list for this question I am using tomcat 5.0.28 I have a simple web app and want to serve up some images in the jsp pages, but the images are outside the context The HTTP statement looks like trtd img alt=thumb image src=/data/webData/family/DSC01183.JPG/ /td/tr The web app is under /usr/local/tomcat/webapp/family On the browser it only shows thumb image as it cannot get to the hyperlink http://xx.xx.xx.xx/data/webData/family/DSC01183.JPG (IP shown as xx.xx.xx.xx for security) I have read a lot about tomcat and figure there must be a way to configure server.xml and/or web.xml to allow this to work, but cannot see it ? It is possible ? Are you wanting TC to serve the static files or do you use AJP connector and Apache. The easiest way to serve files from outside is to let Apache serve them and configure up AJP connector, then mount the entire content or just *.jsp pages to TC. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
connection timeout reached JK IsapiRedirect.dll
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm using tomcat 4.1.x and Coyote JK connector, with IIS 5. I just updated to isapi_redirect-1.2.14.dll. I did that because I've been getting alot of those error messages into the log(stderr.log): - - 12.10.2005 09:50:53 org.apache.jk.common.ChannelSocket processConnection - - INFO: connection timeout reached Can anyone explaine these (still coming after the update). this is the config for the connector : Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=275 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=1 useURIValidationHack=false tomcatAuthentication=true protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ thanx, [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDTN9K19KgIQihNwgRAlEpAJ9sNvVp9B5cVaOROkswt2A0oyZu7ACfVDCA PE2yIFPgurN3CX0jPv2duHo= =pm9R -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: connection timeout reached JK IsapiRedirect.dll
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 ah sorry, I mean IIS 6 (the newest one). - -reynir Reynir Hubner wrote: Hi, I'm using tomcat 4.1.x and Coyote JK connector, with IIS 5. I just updated to isapi_redirect-1.2.14.dll. I did that because I've been getting alot of those error messages into the log(stderr.log): - 12.10.2005 09:50:53 org.apache.jk.common.ChannelSocket processConnection - INFO: connection timeout reached Can anyone explaine these (still coming after the update). this is the config for the connector : Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8009 minProcessors=5 maxProcessors=275 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=1 useURIValidationHack=false tomcatAuthentication=true protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler/ thanx, [EMAIL PROTECTED] - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDTOFG19KgIQihNwgRAtBdAJ9Tzd03Xisk0cmCIzmXN3ijGICvKwCaA/Hw ZmGsSQ7Sv2iijXswfVLhHV4= =dnj5 -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat on Windows: advantages of running as a service?
I'm running Tomcat 5.0.28 on a Windows 2003 server, and I need to automatically shut it down restart it. One way is to control it via shutdown.bat startup.bat, and run these as scheduled tasks at (say) 3:30am and 3:31am. However, I've noticed that while shutdown.bat will shut it down if it was previously started as a service, startup.bat won't run it as a service, it starts it at a command prompt. My question is: does this matter? If I'm running on Windows are there any advantages to running Tomcat as a service? Or disadvantages to running from the command prompt? The server is dedicated to tomcat, by the way. Tom Burke - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat on Windows: advantages of running as a service?
From: Tom Burke [mailto:[EMAIL PROTECTED] Sent: 12 October 2005 11:18 To: Tomcat Users List Subject: Tomcat on Windows: advantages of running as a service? I'm running Tomcat 5.0.28 on a Windows 2003 server, and I need to automatically shut it down restart it. One way is to control it via shutdown.bat startup.bat, and run these as scheduled tasks at (say) 3:30am and 3:31am. However, I've noticed that while shutdown.bat will shut it down if it was previously started as a service, startup.bat won't run it as a service, it starts it at a command prompt. Why not use net stop servicename and net start servicename with the name of the Tomcat service? My question is: does this matter? If I'm running on Windows are there any advantages to running Tomcat as a service? Or disadvantages to running from the command prompt? If you run it as a service: you can ensure it restarts if the machine reboots unexpectedly for any reason; you can take actions if the service crashes; and you can run the service as a specified user fairly simply. If you run from the command line, you have none of these options. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat on Windows: advantages of running as a service?
The net start service name and net stop service name commands will allow you to stop and start Windows services from the command line (and thus from a batch script). You can get the service name from the Services property window. On Wed, 2005-10-12 at 06:18, Tom Burke wrote: I'm running Tomcat 5.0.28 on a Windows 2003 server, and I need to automatically shut it down restart it. One way is to control it via shutdown.bat startup.bat, and run these as scheduled tasks at (say) 3:30am and 3:31am. However, I've noticed that while shutdown.bat will shut it down if it was previously started as a service, startup.bat won't run it as a service, it starts it at a command prompt. My question is: does this matter? If I'm running on Windows are there any advantages to running Tomcat as a service? Or disadvantages to running from the command prompt? The server is dedicated to tomcat, by the way. Tom Burke - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat on Windows: advantages of running as a service?
Running from a service makes it a no brainer to start up tomcat when you reboot the machine as it does it automatically. Disadvantages I would see is that it hides the console and makes it difficult to changes options like JAVA_OPTS. -Original Message- From: Ben Souther [mailto:[EMAIL PROTECTED] Sent: 12 October 2005 12:12 To: Tomcat Users List Subject: Re: Tomcat on Windows: advantages of running as a service? The net start service name and net stop service name commands will allow you to stop and start Windows services from the command line (and thus from a batch script). You can get the service name from the Services property window. On Wed, 2005-10-12 at 06:18, Tom Burke wrote: I'm running Tomcat 5.0.28 on a Windows 2003 server, and I need to automatically shut it down restart it. One way is to control it via shutdown.bat startup.bat, and run these as scheduled tasks at (say) 3:30am and 3:31am. However, I've noticed that while shutdown.bat will shut it down if it was previously started as a service, startup.bat won't run it as a service, it starts it at a command prompt. My question is: does this matter? If I'm running on Windows are there any advantages to running Tomcat as a service? Or disadvantages to running from the command prompt? The server is dedicated to tomcat, by the way. Tom Burke - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * This E-mail may be confidential and may also be legally priviledged. If you are not the intended recipient, please notify us immediately; You should not copy it or use it for any purpose, nor disclose its content to any person. E-mail may be subject to data corruption accidentally or deliberately. For this reaszon it is inappropriate to rely on advice contained in an e-mail without obtaining written confirmation of it first. Authorised and regulated by the Financial Services Authority * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Illegal Field Name Error
Hello, below I have provided the struts configuration file: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.2//EN http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd; struts-config global-forwards forward name=home path=/home.jsp / /global-forwards action-mappings action path=/registrationType type=registration.RegistrationTypeAction forward name=missing-registration-type path=/missingRegistrationType.html / /action /action-mappings /struts-config I am new to Struts so perhaps I overlooked something. Also, Anto, thanks for your input. I flushed the .class files and recompiled but that did not fix the problem. I also tried with a fresh copy of struts.jar. Your help would be greatly appreciated. Thanks. - Asad On Tue, 11 Oct 2005, Raghupathy,Gurumoorthy wrote: Cant you send the struts-config.xml ? -Original Message- From: Asad Habib [mailto:[EMAIL PROTECTED] Sent: 11 October 2005 14:59 To: tomcat-user@jakarta.apache.org Subject: Illegal Field Name Error I am receiving the following error when trying to run a Struts application. I checked and it seems that I do have all of the appropriate jar files installed. But for some reason, the Action class is not being recognized. Any help would be greatly appreciated. Thank you. - Asad HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Illegal field name has inconsistent hierarchy in class registration/RegistrationTypeAction org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:293) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:16 1) root cause java.lang.ClassFormatError: Illegal field name has inconsistent hierarchy in class registration/RegistrationTypeAction java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:620) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo ader.java:1629) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav a:850) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1299) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1181) org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:117) org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:14 3) org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcess or.java:280) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:218) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:16 1) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs. Apache Tomcat/5.5.9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Illegal Field Name Error
Can you prove me the action registration.RegistrationTypeAction as well ? -Original Message- From: Asad Habib [mailto:[EMAIL PROTECTED] Sent: 12 October 2005 12:42 To: Raghupathy,Gurumoorthy Cc: [EMAIL PROTECTED]; 'Tomcat Users List' Subject: RE: Illegal Field Name Error Hello, below I have provided the struts configuration file: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.2//EN http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd; struts-config global-forwards forward name=home path=/home.jsp / /global-forwards action-mappings action path=/registrationType type=registration.RegistrationTypeAction forward name=missing-registration-type path=/missingRegistrationType.html / /action /action-mappings /struts-config I am new to Struts so perhaps I overlooked something. Also, Anto, thanks for your input. I flushed the .class files and recompiled but that did not fix the problem. I also tried with a fresh copy of struts.jar. Your help would be greatly appreciated. Thanks. - Asad On Tue, 11 Oct 2005, Raghupathy,Gurumoorthy wrote: Cant you send the struts-config.xml ? -Original Message- From: Asad Habib [mailto:[EMAIL PROTECTED] Sent: 11 October 2005 14:59 To: tomcat-user@jakarta.apache.org Subject: Illegal Field Name Error I am receiving the following error when trying to run a Struts application. I checked and it seems that I do have all of the appropriate jar files installed. But for some reason, the Action class is not being recognized. Any help would be greatly appreciated. Thank you. - Asad HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Illegal field name has inconsistent hierarchy in class registration/RegistrationTypeAction org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:293) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:16 1) root cause java.lang.ClassFormatError: Illegal field name has inconsistent hierarchy in class registration/RegistrationTypeAction java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:620) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo ader.java:1629) org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav a:850) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1299) org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav a:1181) org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:117) org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:14 3) org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcess or.java:280) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:218) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:243) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:16 1) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs. Apache Tomcat/5.5.9 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Refresh ResourceBundle
Hi! I'm using the i18n taglibrary to i18n a site i'm working on. The administration features not only i18n but also contentmanagement. The problem is that I can't find out how to refresh my ResourceBundle in any kind of way other than restart the whole webapp. Are there any way to tell tomcat to reload ResourceBundles? Thanks in advance Roland Carlsson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamical class loading
Hi, I used dynamic class reloading on a commercial J2EE server and, believe me, it brings far more problems than it solves. First, when you dynamically reload a class here is what can happen: webapp start under classloader instance x webapp instanciate class A and store in session session.setAttribute(someKey,someA) class A has changed on disk, classloader reload it using a special class loader and marking this class to be handled by this new classloader (y) now this code A someA = (A)session.getAttribute(someKey) will through a ClassCastException because A.getClass() != session.getAttribute(someKey).getClass() while A.getClass().getName().equals(session.getAttribute(someKey).getClass().getName()) is true :) All code involving static method/static variables is subject to such breakdown. More funny, you can end up in some condition instanciating old version of classes. Thrust me, when dynamically classloading, half of code breaks like this most of time, sometimes silently, and you end up crazy, trying to debug a code which in fact is not bugged. If your webapp is particulary slow to start and you need faster development, better take a look at unit testing of deactivate parts of your webapp when debugging! dumbQuestionsAsker _ a écrit : can somone give me an information? I want to know if it is possible to past and load classes into web-inf/classes path without beeing forced to reload the whole webapp ? _ 10 Mo pour vos pièces jointes avec MSN Hotmail ! http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Refresh ResourceBundle
Hi, you can write a class which handles the loading of the resoucres, so you can control the behaviour. We have the resource bundles in the DB, so we can administer it via the DB without restarting the application Cheers Bernhard -Ursprüngliche Nachricht- Von: Roland Carlsson [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 12. Oktober 2005 15:20 An: tomcat-user@jakarta.apache.org Betreff: Refresh ResourceBundle Hi! I'm using the i18n taglibrary to i18n a site i'm working on. The administration features not only i18n but also contentmanagement. The problem is that I can't find out how to refresh my ResourceBundle in any kind of way other than restart the whole webapp. Are there any way to tell tomcat to reload ResourceBundles? Thanks in advance Roland Carlsson - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: dynamical class loading
Thrust me, when dynamically classloading, half of code breaks ^^ *rotfl* this has made my afternoon FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK Disclaimer: The information contained within this e-mail is confidential and may be privileged. This email is intended solely for the named recipient only; if you are not authorised you must not disclose, copy, distribute, or retain this message or any part of it. If you have received this message in error please contact the sender at once so that we may take the appropriate action and avoid troubling you further. Any views expressed in this message are those of the individual sender. QAS Limited has the right lawfully to record, monitor and inspect messages between its employees and any third party. Your messages shall be subject to such lawful supervision as QAS Limited deems to be necessary in order to protect its information, its interests and its reputation. Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS Limited cannot guarantee that attachments are virus free or compatible with your systems and does not accept any liability in respect of viruses or computer problems experienced. /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: dynamical class loading
Allistair Crossley a écrit : Thrust me, when dynamically classloading, half of code breaks ^^ *rotfl* this has made my afternoon Nice one indeed :D - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fw: Tomcat on Windows: advantages of running as a service?
Thanks to Peter and other who made this, in retrospect, obvious suggestion! I'm pleased to say it works perfectly. Tom Burke - Original Message - From: Peter Crowther [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Wednesday, October 12, 2005 11:49 AM Subject: RE: Tomcat on Windows: advantages of running as a service? From: Tom Burke [mailto:[EMAIL PROTECTED] Sent: 12 October 2005 11:18 To: Tomcat Users List Subject: Tomcat on Windows: advantages of running as a service? I'm running Tomcat 5.0.28 on a Windows 2003 server, and I need to automatically shut it down restart it. One way is to control it via shutdown.bat startup.bat, and run these as scheduled tasks at (say) 3:30am and 3:31am. However, I've noticed that while shutdown.bat will shut it down if it was previously started as a service, startup.bat won't run it as a service, it starts it at a command prompt. Why not use net stop servicename and net start servicename with the name of the Tomcat service? My question is: does this matter? If I'm running on Windows are there any advantages to running Tomcat as a service? Or disadvantages to running from the command prompt? If you run it as a service: you can ensure it restarts if the machine reboots unexpectedly for any reason; you can take actions if the service crashes; and you can run the service as a specified user fairly simply. If you run from the command line, you have none of these options. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
filter: How to set browser encoding?
Hi everybody, I've got a request from my client to force an encoding in the browser, regardless what user have set. When I set encoding inside my filter to Windows-1257 in the HTML source code I see only ?s:??? ? ???. Is there any easy way to enforce browser to set proper encoding? May be I need to setContent type after I obtain a writer in the servlet? Note, all outputs are generated by servlets: public void doPost( HttpServletRequest req, HttpServletResponse resp ) throws IOException, ServletException { // do something resp.setContentType(text/html); resp.getWriter().println(output); } In MyFilter.doFilter() I do following: (HttpServletResponse)response).setContentType(text/html;charset=Windows-1257) I use 5.0.28 with Redhat 9. Any input is welcome. Thanks! Mark. __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: filter: How to set browser encoding?
Mark, have a look here: http://javawebparts.sourceforge.net/javadocs/javawebparts/filter/CharacterEncodingFilter.html Just added that to JWP last weekend :) It essentially calls request.setCharacterEncoding() with whatever you configure. (Oops... ignore the description of the encodingScheme parameter... just realized I have a cut-and-paste error in the javadoc. D'oh!). -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Wed, October 12, 2005 10:53 am, Mark said: Hi everybody, I've got a request from my client to force an encoding in the browser, regardless what user have set. When I set encoding inside my filter to Windows-1257 in the HTML source code I see only ?s:??? ? ???. Is there any easy way to enforce browser to set proper encoding? May be I need to setContent type after I obtain a writer in the servlet? Note, all outputs are generated by servlets: public void doPost( HttpServletRequest req, HttpServletResponse resp ) throws IOException, ServletException { // do something resp.setContentType(text/html); resp.getWriter().println(output); } In MyFilter.doFilter() I do following: (HttpServletResponse)response).setContentType(text/html;charset=Windows-1257) I use 5.0.28 with Redhat 9. Any input is welcome. Thanks! Mark. __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Q:how to remove charset from HTTP responce to allow browser use a browser selected charset?
Hi Rick, Yes my data comes from different locales I should say it's a legacy data. I have no ability co convert it to UTF-8 right now. response.setContentType(text/html;charset=...); mess up the not UTF-8 output, I'm getting ???s instead of a valid data. I think I'll go with request.setCharacterEncoding(encoding); Crossing my fingers... Mark. --- Rick [EMAIL PROTECTED] wrote: Hi Mark, Can you talk a little about what the data is.. Just form data from different locales? I store all my data in UTF-8 and just instruct the page encoding to be the same (UTF-8) and I'm able to handle input and display of whatever people enter. Had a few odd things to overcome to get it working like, JSP: I had to save the actual JSP file in UTF8 otherwise I couldn't get it to serve the page with UTF8 properly.. This started after Tomcat 5.0.16 or something like that. Servlet: don't think I had to do anything wild.. Just set the charset before you do anything with the output stream, including just getting a handle to the stream writer. Set the contenttype first. response.setContentType(text/html;charset=UTF-8); Depending on what you are reading from and such. You may also want to set some Java ARGs when starting Tomcat... Like: -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8 -DjavaEncoding=UTF-8 Not sure if this is relevant, but hope it helps, Rick -Original Message- From: Mark [mailto:[EMAIL PROTECTED] Posted At: Thursday, October 06, 2005 12:13 PM Posted To: Tomcat Dev Conversation: Q:how to remove charset from HTTP responce to allow browser use a browser selected charset? Subject: Re: Q:how to remove charset from HTTP responce to allow browser use a browser selected charset? Hi Mark, In my case servlet generates an output, so no JSP for now... Can I do it using filters? Or define and store user's prefs with encoding outside of tomcat and in the session and use if it's exists in the session? Thanks a lot! Mark. --- Mark Thomas [EMAIL PROTECTED] wrote: Mark wrote: Hello, In my application users enter data using different languages. The problem I'm facing is the browser sets the page encoding always to ISO-8859-1. (I guess this is default based on server OS) User can change encoding on the page (Browser settings) and everything looks OK but only for one page. On the next page encoding is back to ISO-8859-1. Is there any way to instruct tomcat not to send the page encoding? If you are using JSPs, no. The spec requires that the charset is set. Mark - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Yahoo! for Good Donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: serving content from outside the context
Thanks for the suggestions I didn't really want to run Apache, especially as I have tomcat (which is suppose to be a web server - I thought ?) For now I have added a file to .../tomcat/conf/Catalina/localhost/myData.xml This xml file contains ?xml version='1.0' encoding='utf-8'? Context path = /myData docBase=/data/webData /Context now I can access http://xx.xx.xx.xx/myData/ In the dir /data/webData, I created a WEB-INF and a WEB-INF/web.xml I guess what I have done is created a new context in the area of my hard drive where the static jpg files exist The only issue I have is that I expose /data/webData part of my hard drive John At 10:06 AM 10/12/2005 +0100, Arup Vidyerthy wrote: Or if you don't want to do what Darryl is suggesting you can configure your tomcat to use unix symlinks by setting the allowLinking attribute to true. Then you can simply create a softlink inside your webapp directory that points to your data directory. That will work as well. Arup -Original Message- From: Darryl L. Miles [mailto:[EMAIL PROTECTED] Sent: 12 October 2005 09:59 To: Tomcat Users List Subject: Re: serving content from outside the context John Laughton wrote: Hi, I hope this is the right mailing list for this question I am using tomcat 5.0.28 I have a simple web app and want to serve up some images in the jsp pages, but the images are outside the context The HTTP statement looks like trtd img alt=thumb image src=/data/webData/family/DSC01183.JPG/ /td/tr The web app is under /usr/local/tomcat/webapp/family On the browser it only shows thumb image as it cannot get to the hyperlink http://xx.xx.xx.xx/data/webData/family/DSC01183.JPG (IP shown as xx.xx.xx.xx for security) I have read a lot about tomcat and figure there must be a way to configure server.xml and/or web.xml to allow this to work, but cannot see it ? It is possible ? Are you wanting TC to serve the static files or do you use AJP connector and Apache. The easiest way to serve files from outside is to let Apache serve them and configure up AJP connector, then mount the entire content or just *.jsp pages to TC. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide with voicemail http://uk.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] * John Laughton,Cisco Systems ([EMAIL PROTECTED]) 408.902.3592 (voicemail and fax) page - 1 800 365 4578 *
Re:Tomcat on Windows: advantages of running as a service?
Why do you have to stop and start Tomcat each night? Just curious... - a href=http://Tomcat_User_List.roomity.com;roomity.com/a Your Roomity Broadband Webapp ~~1129134722658~~ -
RE: Tomcat 5.5.12 and user-agent header
OK - yes, it was lack of sleep that was causing the problem to not appear, I was starting Tomcat 5.5.9 instead of 5.5.12, sorry :( The problem is still there. I even took SiteMesh out of the picture, to make sure it was not the problem (should of done that sooner). Here are the steps: 1) Request a protected page form my app. 2) My CMA login page pops up, I enter userid and password. 3) This POST is issued when I submit it: POST /stars/auth/ j_username=user1j_password=password1login=Login 4) HTTPLiveHeaders show all of the GET requests have a user-agent set (I've included all 90 lines of them below). 5) My page that appears has the following code: % String _userAgent = request.getHeader(user-agent); out.write(USER-AGENT=+_userAgent); ... 6) And displays the following on my page: USER-AGENT=null Unless someone has other ideas I'm thinking it's a but in 5.5.12 at this point and will post it to Bugzilla. Thanks to Mark and others for their help. - Richard START OF HTTPLiveHeaders capture from the above POST: http://smartfish:8080/stars/auth/ POST /stars/auth/ HTTP/1.1 Host: smartfish:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q= 0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://smartfish:8080/stars/HomePage.do Cookie: JSESSIONID=3F6575A5957AC84BCC60FA878ED092A5.srv1; username=user1 Content-Type: application/x-www-form-urlencoded Content-Length: 45 j_username=user1j_password=password1login=Login HTTP/1.x 302 Moved Temporarily Server: Apache-Coyote/1.1 Location: http://smartfish:8080/stars/j_security_check?j_username=user1j_password=fbc e66f99c809283638f344ecb3d50674ea64189 Content-Length: 0 Date: Wed, 12 Oct 2005 16:33:46 GMT -- http://smartfish:8080/stars/j_security_check?j_username=user1j_password=fbc e66f99c809283638f344ecb3d50674ea64189 GET /stars/j_security_check?j_username=user1j_password=fbce66f99c809283638f344e cb3d50674ea64189 HTTP/1.1 Host: smartfish:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q= 0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://smartfish:8080/stars/HomePage.do Cookie: JSESSIONID=3F6575A5957AC84BCC60FA878ED092A5.srv1; username=user1 HTTP/1.x 302 Moved Temporarily Server: Apache-Coyote/1.1 Location: http://smartfish:8080/stars/HomePage.do Content-Length: 0 Date: Wed, 12 Oct 2005 16:33:46 GMT -- http://smartfish:8080/stars/HomePage.do GET /stars/HomePage.do HTTP/1.1 Host: smartfish:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q= 0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://smartfish:8080/stars/HomePage.do Cookie: JSESSIONID=3F6575A5957AC84BCC60FA878ED092A5.srv1; username=user1 HTTP/1.x 200 OK Server: Apache-Coyote/1.1 Pragma: No-cache Cache-Control: no-cache,no-store,max-age=0 Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: text/html;charset=UTF-8 Content-Language: en Content-Length: 2989 Date: Wed, 12 Oct 2005 16:33:52 GMT -- http://smartfish:8080/stars/WEB-INF/pages/%3C%=request.getContextPath()%%3E/ images/cm_fill.gif GET /stars/WEB-INF/pages/%3C%=request.getContextPath()%%3E/images/cm_fill.gif HTTP/1.1 Host: smartfish:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Accept: image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://smartfish:8080/stars/HomePage.do Cookie: JSESSIONID=3F6575A5957AC84BCC60FA878ED092A5.srv1; username=user1 HTTP/1.x 400 Invalid URI Server: Apache-Coyote/1.1 Transfer-Encoding: chunked Date: Wed, 12 Oct 2005 16:33:52 GMT Connection: close -- -Original Message- From: Richard Mixon [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 12, 2005 12:45 AM To: 'Tomcat Users List' Subject: RE: Tomcat 5.5.12 and user-agent header Mark, Thanks - should have thought of that first. Now that I turned on LiveHTTPHeaders, I cannot get it to fail. I was able to do this consistently before.
Re: Tomcat 5.5.12 and user-agent header
Does this only occur when connecting directly to Tomcat or is it also an issue when going through Apache and mod_jk? Richard Mixon wrote: OK - yes, it was lack of sleep that was causing the problem to not appear, I was starting Tomcat 5.5.9 instead of 5.5.12, sorry :( The problem is still there. I even took SiteMesh out of the picture, to make sure it was not the problem (should of done that sooner). Here are the steps: 1) Request a protected page form my app. 2) My CMA login page pops up, I enter userid and password. 3) This POST is issued when I submit it: POST /stars/auth/ j_username=user1j_password=password1login=Login 4) HTTPLiveHeaders show all of the GET requests have a user-agent set (I've included all 90 lines of them below). 5) My page that appears has the following code: % String _userAgent = request.getHeader(user-agent); out.write(USER-AGENT=+_userAgent); ... 6) And displays the following on my page: USER-AGENT=null Unless someone has other ideas I'm thinking it's a but in 5.5.12 at this point and will post it to Bugzilla. Thanks to Mark and others for their help. - Richard START OF HTTPLiveHeaders capture from the above POST: http://smartfish:8080/stars/auth/ POST /stars/auth/ HTTP/1.1 Host: smartfish:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q= 0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://smartfish:8080/stars/HomePage.do Cookie: JSESSIONID=3F6575A5957AC84BCC60FA878ED092A5.srv1; username=user1 Content-Type: application/x-www-form-urlencoded Content-Length: 45 j_username=user1j_password=password1login=Login HTTP/1.x 302 Moved Temporarily Server: Apache-Coyote/1.1 Location: http://smartfish:8080/stars/j_security_check?j_username=user1j_password=fbc e66f99c809283638f344ecb3d50674ea64189 Content-Length: 0 Date: Wed, 12 Oct 2005 16:33:46 GMT -- http://smartfish:8080/stars/j_security_check?j_username=user1j_password=fbc e66f99c809283638f344ecb3d50674ea64189 GET /stars/j_security_check?j_username=user1j_password=fbce66f99c809283638f344e cb3d50674ea64189 HTTP/1.1 Host: smartfish:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q= 0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://smartfish:8080/stars/HomePage.do Cookie: JSESSIONID=3F6575A5957AC84BCC60FA878ED092A5.srv1; username=user1 HTTP/1.x 302 Moved Temporarily Server: Apache-Coyote/1.1 Location: http://smartfish:8080/stars/HomePage.do Content-Length: 0 Date: Wed, 12 Oct 2005 16:33:46 GMT -- http://smartfish:8080/stars/HomePage.do GET /stars/HomePage.do HTTP/1.1 Host: smartfish:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q= 0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://smartfish:8080/stars/HomePage.do Cookie: JSESSIONID=3F6575A5957AC84BCC60FA878ED092A5.srv1; username=user1 HTTP/1.x 200 OK Server: Apache-Coyote/1.1 Pragma: No-cache Cache-Control: no-cache,no-store,max-age=0 Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: text/html;charset=UTF-8 Content-Language: en Content-Length: 2989 Date: Wed, 12 Oct 2005 16:33:52 GMT -- http://smartfish:8080/stars/WEB-INF/pages/%3C%=request.getContextPath()%%3E/ images/cm_fill.gif GET /stars/WEB-INF/pages/%3C%=request.getContextPath()%%3E/images/cm_fill.gif HTTP/1.1 Host: smartfish:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Accept: image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://smartfish:8080/stars/HomePage.do Cookie: JSESSIONID=3F6575A5957AC84BCC60FA878ED092A5.srv1; username=user1 HTTP/1.x 400 Invalid URI Server: Apache-Coyote/1.1 Transfer-Encoding: chunked Date: Wed, 12 Oct 2005 16:33:52 GMT Connection: close -- -Original Message- From: Richard Mixon [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 12, 2005 12:45 AM To: 'Tomcat Users List' Subject: RE: Tomcat 5.5.12 and user-agent header Mark, Thanks - should
where is a text/html;charset= ?
Hi everybody, How can I see the complete output stream for each http request? I tried: -- $telnet localhost 8080 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET / htmlheadtitleHello Test4/title/headbody/body/html - Where is a text/html;charset=...? or I'm missing something? Thanks, Mark. __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: where is a text/html;charset= ?
You need to submit a valid HTTP request. Yours doesn't have the version at the end of the request line. Try: GET / HTTP/1.0 (Thats a two linefeeds: one marking the end of the request line and one blank line indiating the end of the http headers) You should then see the HTTP response, headers and all. If you want to submit HTTP/1.1 requests you need to submit some mandatory headers (Host and maybe Date) otherwise you get a 400 back. $ telnet telnet open localhost 8080 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET / HTTP/1.1 HTTP/1.1 400 Bad Request Transfer-Encoding: chunked Date: Wed, 12 Oct 2005 17:26:36 GMT Server: Apache-Coyote/1.1 Connection: close 0 Alternatively you can use plug-ins for Mozilla/Firefox and IE which allow you to see the raw response: http://livehttpheaders.mozdev.org/ http://www.blunck.info/iehttpheaders.html HTH, Jon Mark wrote: Hi everybody, How can I see the complete output stream for each http request? I tried: -- $telnet localhost 8080 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET / htmlheadtitleHello Test4/title/headbody/body/html - Where is a text/html;charset=...? or I'm missing something? Thanks, Mark. __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat 5.5.12 and user-agent header
Have not tried it with Apache/mod_jk in front - just with Tomcat and accessing it as http://computername:8080/stars/HomePage.do . Not sure of your drift. Are you just looking for another date point (that's good) - or is there some implication as to how user-agent headers work with Tomcat standalone? Thank you - Richard -Original Message- From: Jess Holle [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 12, 2005 10:00 AM To: Tomcat Users List Subject: Re: Tomcat 5.5.12 and user-agent header Does this only occur when connecting directly to Tomcat or is it also an issue when going through Apache and mod_jk? Richard Mixon wrote: OK - yes, it was lack of sleep that was causing the problem to not appear, I was starting Tomcat 5.5.9 instead of 5.5.12, sorry :( The problem is still there. I even took SiteMesh out of the picture, to make sure it was not the problem (should of done that sooner). Here are the steps: 1) Request a protected page form my app. 2) My CMA login page pops up, I enter userid and password. 3) This POST is issued when I submit it: POST /stars/auth/ j_username=user1j_password=password1login=Login 4) HTTPLiveHeaders show all of the GET requests have a user-agent set (I've included all 90 lines of them below). 5) My page that appears has the following code: % String _userAgent = request.getHeader(user-agent); out.write(USER-AGENT=+_userAgent); ... 6) And displays the following on my page: USER-AGENT=null Unless someone has other ideas I'm thinking it's a but in 5.5.12 at this point and will post it to Bugzilla. Thanks to Mark and others for their help. - Richard START OF HTTPLiveHeaders capture from the above POST: http://smartfish:8080/stars/auth/ POST /stars/auth/ HTTP/1.1 Host: smartfish:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pla in;q= 0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://smartfish:8080/stars/HomePage.do Cookie: JSESSIONID=3F6575A5957AC84BCC60FA878ED092A5.srv1; username=user1 Content-Type: application/x-www-form-urlencoded Content-Length: 45 j_username=user1j_password=password1login=Login HTTP/1.x 302 Moved Temporarily Server: Apache-Coyote/1.1 Location: http://smartfish:8080/stars/j_security_check?j_username=user1j_passwor d=fbc e66f99c809283638f344ecb3d50674ea64189 Content-Length: 0 Date: Wed, 12 Oct 2005 16:33:46 GMT -- http://smartfish:8080/stars/j_security_check?j_username=user1j_passwor d=fbc e66f99c809283638f344ecb3d50674ea64189 GET /stars/j_security_check?j_username=user1j_password=fbce66f99c809283638 f344e cb3d50674ea64189 HTTP/1.1 Host: smartfish:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pla in;q= 0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://smartfish:8080/stars/HomePage.do Cookie: JSESSIONID=3F6575A5957AC84BCC60FA878ED092A5.srv1; username=user1 HTTP/1.x 302 Moved Temporarily Server: Apache-Coyote/1.1 Location: http://smartfish:8080/stars/HomePage.do Content-Length: 0 Date: Wed, 12 Oct 2005 16:33:46 GMT -- http://smartfish:8080/stars/HomePage.do GET /stars/HomePage.do HTTP/1.1 Host: smartfish:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/pla in;q= 0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://smartfish:8080/stars/HomePage.do Cookie: JSESSIONID=3F6575A5957AC84BCC60FA878ED092A5.srv1; username=user1 HTTP/1.x 200 OK Server: Apache-Coyote/1.1 Pragma: No-cache Cache-Control: no-cache,no-store,max-age=0 Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: text/html;charset=UTF-8 Content-Language: en Content-Length: 2989 Date: Wed, 12 Oct 2005 16:33:52 GMT -- http://smartfish:8080/stars/WEB-INF/pages/%3C%=request.getContextPath() %%3E/ images/cm_fill.gif GET /stars/WEB-INF/pages/%3C%=request.getContextPath()%%3E/images/cm_fill.g if HTTP/1.1 Host: smartfish:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7 Accept: image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive
Re: Tomcat 5.5.12 and user-agent header
Richard Mixon wrote: Have not tried it with Apache/mod_jk in front - just with Tomcat and accessing it as http://computername:8080/stars/HomePage.do . Not sure of your drift. Are you just looking for another date point (that's good) - or is there some implication as to how user-agent headers work with Tomcat standalone? I'm wondering whether any issue that exists is Tomcat-wide or specific to the HTTP connector (or to the new AJP-based connectors for that matter). -- Jess Holle - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Newbee question on servlet and html - Really frustated with this problem.
thanks everybody. I could solve the problem. There was a typo in my response text. When I changed the following line response.setContentType(test/html); with response.setContentType(text/html); It jus worked like a charm. thanks ! On 10/10/05, Developer Developer [EMAIL PROTECTED] wrote: does anybody know how to fix this problem. Invocation of servlet prompts a messagebox posing a questions do you want to save this ? instead of executing it and returing the output in the html document. :( On 10/10/05, Developer Developer [EMAIL PROTECTED] wrote: I wrote my first html and servlet and deployed it on tomcat 5.5. The html works okay when I call it from the browser. The servlet too works okay when I call its doget() method by invoking it from the browser. EG:. http://localhost:8080/VBeer/BeerSelect However, when i try to invoke the servlet from an html form I get a message box - (file download security warning) - Do you want to save this file ? It has a funny number suffixed to the my servlet name. Not sure what is happening. Here is my HTML code snippet. body h1 align =3D centerBeer selecton Page /h1 form method=3DPOST action=3DBeerSelect pSelect Beer Characteristics/p Thanks !
Context Relative versus Path Relative error pages
Hi All, We ran into a problem with JSP pages under Tomcat 5.5.9 which did not exist under Tomcat 4.1.31. In Tomcat 5.5.9 if we forward to a JSP page that is in a different directory then the initial request the errorPage directive does not work as we expected. If we use a path relative errorPage directive then Tomcat 5.5.9 seems to assume that the errorPage path is relative to the path of the initial HTTP request not the JSP page. Is this behavior correct? For example, Error 404, /servlet/PopError.jsp appears if an HTTP request of /servlet/PathServ forwards to a JSP page, /popdrv/pathRelative.jsp, that uses relative paths and then throws an exception. %@ page language=java session=true errorPage=PopError.jsp % We found a similar entry in BugZilla which was closed because the problem could not be reproduced. http://issues.eu.apache.org/bugzilla/show_bug.cgi?id=35230 One can get the correct errorPage by using a Context relative path. %@ page language=java session=true errorPage=/popdrv/PopError.jsp % We have attached 6 files, PathServ.java, pathRelative.jsp, ContextServ.java, contextRelative.jsp, PopError.jsp, and web.xml. To see the issue one can create a context and place PathServ.java in the directory com.optimedsys.servlet, pathRelative.jsp and PopError.jsp in the directory popdrv. To see the workaround one can place ContextServ.java in the directory com.optimedsys.servlet, contextRelative.jsp and PopError.jsp in the popdrv directory. Request context/servlet/PathServ to see the 404 error or context/servlet/ContextServ to get the correct errorPage. Thank You Lee Breslow [EMAIL PROTECTED] Arlene Milgram [EMAIL PROTECTED] ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd; web-app servlet servlet-namePathServ/servlet-name display-nameDemo use of error directive with error page being relative to the path./display-name descriptionPath Servlet/description servlet-classcom.optimedsys.servlet.PathServ/servlet-class /servlet servlet servlet-nameContextServ/servlet-name display-nameDemo use of error directive with error page being relative to the context/display-name descriptionContext Servlet/description servlet-classcom.optimedsys.servlet.ContextServ/servlet-class /servlet servlet servlet-namecontextRelative.jsp/servlet-name display-namecontextRelative/display-name descriptioncontext Relative/description jsp-file/popdrv/contextRelative.jsp/jsp-file /servlet servlet servlet-namepathRelative.jsp/servlet-name display-namepathRelative/display-name descriptionpath Relative/description jsp-file/popdrv/pathRelative.jsp/jsp-file /servlet servlet servlet-namePopError.jsp/servlet-name display-namePopError/display-name descriptionPopError/description jsp-file/popdrv/PopError.jsp/jsp-file /servlet servlet-mapping servlet-nameContextServ/servlet-name url-pattern/servlet/ContextServ/url-pattern /servlet-mapping servlet-mapping servlet-namePathServ/servlet-name url-pattern/servlet/PathServ/url-pattern /servlet-mapping /web-app - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: where is a text/html;charset= ?
Thanks Jon, text/html;charset= is not there yet... Here what I've got: HTTP/1.1 200 OK Set-Cookie: JSESSIONID=95EA4260325D4C1FCBF8196773A4BED3; Path=/ Content-Length: 478 Date: Wed, 12 Oct 2005 20:34:37 GMT Server: Apache-Coyote/1.1 Connection: close htmlheadtitleHello Test4/title Mark. --- Jon Wingfield [EMAIL PROTECTED] wrote: You need to submit a valid HTTP request. Yours doesn't have the version at the end of the request line. Try: GET / HTTP/1.0 (Thats a two linefeeds: one marking the end of the request line and one blank line indiating the end of the http headers) You should then see the HTTP response, headers and all. If you want to submit HTTP/1.1 requests you need to submit some mandatory headers (Host and maybe Date) otherwise you get a 400 back. $ telnet telnet open localhost 8080 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET / HTTP/1.1 HTTP/1.1 400 Bad Request Transfer-Encoding: chunked Date: Wed, 12 Oct 2005 17:26:36 GMT Server: Apache-Coyote/1.1 Connection: close 0 Alternatively you can use plug-ins for Mozilla/Firefox and IE which allow you to see the raw response: http://livehttpheaders.mozdev.org/ http://www.blunck.info/iehttpheaders.html HTH, Jon Mark wrote: Hi everybody, How can I see the complete output stream for each http request? I tried: -- $telnet localhost 8080 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET / htmlheadtitleHello Test4/title/headbody/body/html - Where is a text/html;charset=...? or I'm missing something? Thanks, Mark. __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: apache virtual hosting + server.xml + context
We are having the similar problem, but if we place context in server.xml, ( I also have a META-INF/context.xml ) and as we are using dbcp connection pool, and it seems that tomcat initializes those pool twice On 10/7/05, gianni dalmasso [EMAIL PROTECTED] wrote: hi list, i have a problem. i have apache 2.0 + tomcat 5.5. i have N name based virtual hosts on the same machine managed by apache; some of them need to use tomcat (have jsp pages and servlets...) if i set a server.xml of tomcat with several hosts, and every host has ist context -- it's ok ( but tomcat documentation says Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended to place Context elements directly in the server.xml file) if i try to move the context informations in a .xml file in a $CATALINA_HOME/conf/[enginename]/[hostname]/ directory, tomcat cannot serve anything (it acts as he cannot find files in docBase); - which is the right configuration ? - is it necessary to define different host in server.xml ?(-- so, when i add a new host i need to restart apache and tomcat...) thanks in advance here is the configuration that works.. HTTPD.CONF Include /var/jakarta-tomcat-5.5.9/conf/mod_jk.conf MOD_JK.CONF . NameVirtualHost xx.yy.zz.kk:80 VirtualHost xx.yy.zz.kk:80 DocumentRoot /var/www/html ServerName web.ccc.com http://web.ccc.com /VirtualHost VirtualHost xx.yy.zz.kk:80 Directory /var/www/html/aaa DirectoryIndex index.htm index.html index.jsp /Directory ServerName www.aaa.com http://www.aaa.com DocumentRoot /var/www/html/aaa JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 /VirtualHost VirtualHost xx.yy.zz.kk:80 Directory /var/jakarta-tomcat-5.5.9/webapps/bbb DirectoryIndex index.htm index.html /Directory ServerName www.bbb.com http://www.bbb.com DocumentRoot /var/jakarta-tomcat-5.5.9/webapps/bbb JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 /VirtualHost SERVER.XML Host name=www.aaa.com http://www.aaa.com Context path= docBase=/var/www/html/aaa debug=0 reloadable=true /Context /Host Host name=www.bbb.com http://www.bbb.com Context path= docBase=/var/jakarta-tomcat-5.5.9/webapps/bbb debug=0 reloadable=true /Context /Host This for example, don't work setting : SERVER.XML Host name=www.aaa.com http://www.aaa.com appBase = /var/www/html/aaa (or similar... ) /Host Host name=www.bbb.com http://www.bbb.com /Host the file : $CATALINA_HOME/conf/Catalina/www.aaa.com/aaa.xml Context path= docBase=/var/www/html/aaa debug=0 reloadable=true /Context - Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3
Re: Getting Apache2 forwarding to tomcat5
Thank you very much. That did the trick. On Tue, 2005-10-11 at 16:58 -0700, Lyndon Tiu wrote: Hello, 1) It is recommended to use mod_jk version 1 as version 2 is deprecated and anything that is new in version 2 has been rolled into version 1. 2) All you need is this in server.xml: !-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -- Connector port=8009 enableLookups=false redirectPort=8443 debug=0 protocol=AJP/1.3 / You may comment out the sections about 8080 and 8443 as apache talks to tomcat through 8009. 3) If you insist on using mod_jk version 2, here are sample config files that worked for me: In httpd.conf: LoadModule jk2_module /usr/local/apache/modules/mod_jk2.so JkSet config.file /usr/local/apache/config/workers2.properties JkSet shm:file /usr/local/apache/logs/shm.file JkSet shm:size 1048576 JkSet shm:disabled 0 In workers2.properties: [channel.socket:server.domain.com:8009] info=Ajp13 forwarding over socket port=8009 host=server.domain.com [ajp13:server.domain.com:8009] channel=channel.socket:server.domain.com:8009 [uri:/*.jsp] worker=ajp13:server.domain.com:8009 -- Lyndon Tiu On Tue, 11 Oct 2005 18:22:21 -0500 tomcat-user@jakarta.apache.org wrote: I have read about 25 different websites on getting this setup. I have read through this list trying to find the answer I need. I have spent the last 2 days and soon 3rd day trying to get this working. I need Apache to forward port 80 and 443 requests to tomcat to 8080 and 8443. I am working on the non-ssl right now. I get an error in Apache error_log saying: [error] uriEnv.init() map to invalid worker /*.jsp-0 ajp13:localhost:8009 [error] uriEnv.init() map to invalid worker /patientC onnect-1 ajp13:localhost:8009 Let me give a bit of history and config files. This is running on SLES9 x86-64 version. Apache and tomcat and the connectors are from RPMs that came with SuSE. Everything is installed in SuSE default install location. httpd.conf.local: LoadModule jk2_module /usr/lib64/apache2/mod_jk2.so Location /*.jsp JkUriSet worker ajp13:localhost:8009 /Location Location /patientConnect JkUriSet worker ajp13:localhost:8009 /Location workers2.properties: [logger] level=DEBUG [config:] file=/etc/apache2/workers2.properties debug=0 debugEnv=0 [uriMap:] info=Maps the requests. Options: debug debug=1 [shm] info=Scoreboard. Required for reconfiguration and status with multiprocess serve rs file=/usr/share/tomcat/logs/jk2.shm size=1048576 debug=0 disabled=0 [workerEnv:] info=Global server options timing=1 debug=0 [status:] info=Status worker, displays runtime informations [uri:patientconnect.truchart.com/jkstatus/*] info=Display status information and checks the config file for changes. group=status: [channel.socket:localhost:8009] info=Ajp13 forwarding over socket # Define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:patientconnect.truchart.com/patientConnect/*] info=patientConnect Both the workers2.properties and the httpd.conf.local are located in /etc/apache2 directory. In the /usr/share/tomcat/conf/ directory is the jk2.properties and the server.xml jk2.properties: ## THIS FILE MAY BE OVERRIDEN AT RUNTIME. MAKE SURE TOMCAT IS STOPED ## WHEN YOU EDIT THE FILE. ## COMMENTS WILL BE _LOST_ ## DOCUMENTATION OF THE FORMAT IN JkMain javadoc. # Set the desired handler list # handler.list=apr,request,channelJni # # Override the default port for the socketChannel channelSocket.port=8009 # Default: # channelUnix.file=${jkHome}/work/jk2.socket # Just to check if the the config is working # shm.file=${jkHome}/work/jk2.shm # In order to enable jni use any channelJni directive # channelJni.disabled = 0 # And one of the following directives: # apr.jniModeSo=/opt/apache2/modules/mod_jk2.so # If set to inprocess the mod_jk2 will Register natives itself # This will enable the starting of the Tomcat from mod_jk2 # apr.jniModeSo=inprocess and the server.xml that was modified: !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -- Connector port=8080 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true / !-- Note : To disable connection timeouts, set connectionTimeout value to 0 -- !-- Note : To use gzip compression you could set the following properti es : compression=on compressionMinSize=2048 noCompressionUserAgents=gozilla, traviata
RE: apache virtual hosting + server.xml + context
From: sudip shrestha [mailto:[EMAIL PROTECTED] Subject: Re: apache virtual hosting + server.xml + context We are having the similar problem, but if we place context in server.xml, ( I also have a META-INF/context.xml ) and as we are using dbcp connection pool, and it seems that tomcat initializes those pool twice Which is exactly as it's defined to work. You should only have one instance for each unique Context element, otherwise you will get multiple deployments and corresponding initializations. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]