How to configure tomcat default character encoding ?
I user Tomcat 5.0.28, the browser send server UTF-8 query string like: QueryString: id=12code=13name=%E5%90%8D%E7%A7%B0 How to configure tomcat default character encoding to UTF-8 ? Dongsheng Song - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to configure tomcat default character encoding ?
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html You should read the documentation for the URIEncoding and useBodyEncodingForURI options. Mark Dongsheng Song wrote: I user Tomcat 5.0.28, the browser send server UTF-8 query string like: QueryString: id=12code=13name=%E5%90%8D%E7%A7%B0 How to configure tomcat default character encoding to UTF-8 ? Dongsheng Song - 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]
setting -Xss option and its impact on servlet threads
Hi , I read about -Xss JVM option used to set the thread stack size and I want to use it for tomcat during startup. My thinking is that if I set it to some smaller value than the default value, this will save me some memory when large number of sevlet threads are started by tomcat during high traffic.and this will help me in giving some larger value for -Xmx option or else if I have 2000 set for my MaxThreads and starting all those threads with default thread stack space will not leave any memory for heap. But I have some basic doubts regarding this:: 1) what is the default stack size for Sun JVM on windows (Win 2003 to be more specefic)?? 2) Will this setting affect both normal threads and the servlet threads created by tomcat?? or only normal threads? 3) If I set that to, say 128K , and if some of my thread (servlet or normal) needed more stack space than this in any case what happens (obvious answer for this would be that thread execution would fail but I want to know it from some one who experienced it) Please correct me if my assumptions are wrong and any suggestion in this regard will be appreciated. With regards Srikanth.P - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] Sharing object between Bean and Servlet
I have a non-static object initialised in a bean which I subsequently need to access in a servlet. But exactly how do I do that? The bean itself is initialised in another JSP so I cannot use % Object myObj = myBean.getObject(); % and then store the object in the request/session or application scope? Any clues would be hghly appreciated as this simple question drives me nuts! /Thomas FONT SIZE=1 FACE=Arial___ Vi goer opmaerksom paa, at denne e-mail kan indeholde fortrolig information. Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om fejlen ved at bruge svar-funktionen. Samtidig beder vi dig slette e-mailen i dit system uden at videresende eller kopiere den. Selv om e-mailen og ethvert vedhaeftet bilag efter vores overbevisning er fri for virus og andre fejl, som kan paavirke computeren eller it-systemet, hvori den modtages og laeses, aabnes den paa modtagerens eget ansvar. Vi paatager os ikke noget ansvar for tab og skade, som er opstaaet i forbindelse med at modtage og bruge e-mailen. ___ Please note that this message may contain confidential information. If you have received this message by mistake, please inform the sender of the mistake by sending a reply, then delete the message from your system without making, distributing or retaining any copies of it. Although we believe that the message and any attachments are free from viruses and other errors that might affect the computer or IT system where it is received and read, the recipient opens the message at his or her own risk. We assume no responsibility for any loss or damage arising from the receipt or use of this message. /FONT
RE: What is the current stable version of jk connector?
Hi Gary. When I asked the same question a while ago the (unofficial) feedback I got was that 1.2.13 was the latest stable release however, after posting a bug report into the bug tracking system (http://issues.apache.org/bugzilla/show_bug.cgi?id=35755), the update I got was that 1.2.13 was never voted as stable and that I should use that. Also, looking at the documentation (http://jakarta.apache.org/tomcat/connectors-doc/index.html) again it seems to have been updated to say that 1.2.14 is the latest stable release. Hope this helps. Alex -Original Message- From: Gary Moh [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 03:15 To: tomcat-user@jakarta.apache.org Subject: What is the current stable version of jk connector? According to http://www.apache.org/dist/jakarta/tomcat-connectors/jk/, the current stable version is 1.2.10. Now, four additional releases have been made. Does 1.2.10 remain the stable version? gary - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Placing a LifecycleListener in my server.xml
Anyone have any ideas where on earth I put my class that implements the LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a context in my server.xml. Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ GlobalNamingResources Environment name=simpleValue type=java.lang.Integer value=30/ Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved /Resource ResourceParams name=UserDatabase parameter namefactory/name valueorg.apache.catalina.users.MemoryUserDatabaseFactory/value /parameter parameter namepathname/name valueconf/tomcat-users.xml/value /parameter /ResourceParams /GlobalNamingResources Service name=Catalina Connector port=80 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=443 acceptCount=100 debug=0 connectionTimeout=2 disableUploadTimeout=true/ Connector port=443 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false disableUploadTimeout=true acceptCount=100 debug=0 scheme=https secure=true clientAuth=false sslProtocol=TLS/ Connector port=8009 enableLookups=false redirectPort=443 debug=0 protocol=AJP/1.3/ Engine name=Catalina defaultHost=localhost debug=0 Logger className=org.apache.catalina.logger.FileLogger prefix=catalina_log. suffix=.txt timestamp=true/ Realm className=org.apache.catalina.realm.UserDatabaseRealm debug=0 resourceName=UserDatabase/ Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Logger className=org.apache.catalina.logger.FileLogger directory=logs prefix=localhost_log. suffix=.txt timestamp=true/ /Host /Engine /Service /Server - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: confused
Try the jspbook - http://www.jspbook.com . You can download the entire book after you register. It's written for tomcat 5 using jdk 1.4 but seems to translate well for tomcat4 (for the most part). This will help. al guys i am seriously confused now.. a normal jsp i can display in tomcat.. ok i have some questions here :- 1) let say i have admin.jsp , i create a folder call MGT .. i put in side the file admin.jsp and create a WEB-INF folder and inside i put web.xml .. is it correct ? 2) do i have customise web.xml or can simply copy and paste the default WEB-INF folder into MGT. 3) i having problem displaying jsp files with Database access, do i haveto use the same mysql-javaconnecter or some other file ( need indepth guide ) ? i know the are alot of guides there .. but most of the skip the prerequisite .. what i really need to have in my linux system in order to setup the tomcat seerver which can display jsp with database access i am sorry if the questions are elementary.. but i have tried to solve on my own but no solution till now any help will be greatly appreciated ... thanks - 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: Placing a LifecycleListener in my server.xml
Mark Benussi wrote: Anyone have any ideas where on earth I put my class that implements the LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a context in my server.xml. The context is in WEB-INF/web.xml as its a webapp specific listener, NOT a global server thing. See my article http://www.hibernate.org/301.html as an example (when used with hibernate) -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Placing a LifecycleListener in my server.xml
Thanks Darryl but I need to implement a LifecycleListener. You have implemented a ServletContextListener which only gets called when the Content is started. I need to know when its finished, which is why I am using a LifecycleListener which should be placed in the server.xml Original Message Follows From: Darryl L. Miles [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: Tomcat Users List tomcat-user@jakarta.apache.org Subject: Re: Placing a LifecycleListener in my server.xml Date: Wed, 27 Jul 2005 11:47:17 +0100 Mark Benussi wrote: Anyone have any ideas where on earth I put my class that implements the LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a context in my server.xml. The context is in WEB-INF/web.xml as its a webapp specific listener, NOT a global server thing. See my article http://www.hibernate.org/301.html as an example (when used with hibernate) -- Darryl L. Miles - 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: What is the current stable version of jk connector?
Gary Moh wrote: According to http://www.apache.org/dist/jakarta/tomcat-connectors/jk/, the current stable version is 1.2.10. Thanks for spotting that. Updated to reflect the 1.2.14 stable. Now, four additional releases have been made. Does 1.2.10 remain the stable version? No. All other versions could be found in the archive.apache.org. Well it will probably take couple of days until all mirror sites pick up the current dist topology. Regards, Mladen - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setting -Xss option and its impact on servlet threads
Peddireddy Srikanth wrote: 1) what is the default stack size for Sun JVM on windows (Win 2003 to be more specefic)?? Dont know. 2) Will this setting affect both normal threads and the servlet threads created by tomcat?? or only normal threads? I believe there is a 1:1 corelation between all Java application threads, be they Servlet or normal threads. That is to say a Servlet thread uses exactly 1 Java thread. 3) If I set that to, say 128K , and if some of my thread (servlet or normal) needed more stack space than this in any case what happens (obvious answer for this would be that thread execution would fail but I want to know it from some one who experienced it) Are you able to change the stack size on a per Java Thread basis? If the underlying JVM uses kernel level threads and stack arrangement in a 1:1 fashion (unlikely from the observations I've seen), an unmapped page/area is usualy left at the end of the stack space if this is touched (read or write) the application will get a terminal signal and the entire JVM forced to exit just like it would accessing any other bit of invalid memory. However as JVM is a sandbox and it can know the amount of stack space a method needs before its invoked it is completely possible for it to be able to check/test its virtual Java stack has enough space left in the CPU instruction stack as there does not need to be 1:1 to the Java execution stack. Its possible for a JVM to implement its Java code execution stack completely within the operating system heap area. I dont believe Java in general needs a large java execution stack as all arrays are implemented as object allocations that come from the heap. So its not like the C language where you can have a few Kb byte array on a whim, in Java it just has to store the pointers to that array as a local variable in the java execution stack. I would be very interested to understand how Sun's JVM application stack works and its interactions with OS level threads, stacks and address space applications. With platform level threads there is a clear trade off with thread stack size and number of available threads, amount of available heap and number of library / file mappings (when working with 32bit CPUs at least). They all squeeze each other for their bit of address space but in Java this does not seem to be the case so much. -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Placing a LifecycleListener in my server.xml
Sorry did not read properly.. Have you tried: for JARs: $CATALINA_HOME/server/lib or $CATALINA_HOME/common/lib for .class: $CATALINA_HOME/server/classes or $CATALINA_HOME/common/classes From: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html *Lifecycle Listeners* If you have implemented a Java object that needs to know when this *Context* is started or stopped, you can declare it by nesting a *Listener* element inside this element. The class name you specify must implement the |org.apache.catalina.LifecycleListener| interface, and it will be notified about the occurrence of the coresponding lifecycle events. Configuration of such a listener looks like this: Context path=/examples ... ... Listener className=com.mycompany.mypackage.MyListener ... ... /Context Note that a Listener can have any number of additional properties that may be configured from this element. Attribute names are matched to corresponding JavaBean property names using the standard property method naming patterns. Mark Benussi wrote: Thanks Darryl but I need to implement a LifecycleListener. You have implemented a ServletContextListener which only gets called when the Content is started. I need to know when its finished, which is why I am using a LifecycleListener which should be placed in the server.xml Original Message Follows From: Darryl L. Miles [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: Tomcat Users List tomcat-user@jakarta.apache.org Subject: Re: Placing a LifecycleListener in my server.xml Date: Wed, 27 Jul 2005 11:47:17 +0100 Mark Benussi wrote: Anyone have any ideas where on earth I put my class that implements the LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a context in my server.xml. The context is in WEB-INF/web.xml as its a webapp specific listener, NOT a global server thing. See my article http://www.hibernate.org/301.html as an example (when used with hibernate) -- Darryl L. Miles - 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] . -- Darryl L. Miles M: 07968 320 114 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Placing a LifecycleListener in my server.xml
Sorry did not read properly.. Have you tried: for JARs: $CATALINA_HOME/server/lib or $CATALINA_HOME/common/lib for .class: $CATALINA_HOME/server/classes or $CATALINA_HOME/common/classes From: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html *Lifecycle Listeners* If you have implemented a Java object that needs to know when this *Context* is started or stopped, you can declare it by nesting a *Listener* element inside this element. The class name you specify must implement the |org.apache.catalina.LifecycleListener| interface, and it will be notified about the occurrence of the coresponding lifecycle events. Configuration of such a listener looks like this: Context path=/examples ... ... Listener className=com.mycompany.mypackage.MyListener ... ... /Context Note that a Listener can have any number of additional properties that may be configured from this element. Attribute names are matched to corresponding JavaBean property names using the standard property method naming patterns. Mark Benussi wrote: Thanks Darryl but I need to implement a LifecycleListener. You have implemented a ServletContextListener which only gets called when the Content is started. I need to know when its finished, which is why I am using a LifecycleListener which should be placed in the server.xml Original Message Follows From: Darryl L. Miles [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: Tomcat Users List tomcat-user@jakarta.apache.org Subject: Re: Placing a LifecycleListener in my server.xml Date: Wed, 27 Jul 2005 11:47:17 +0100 Mark Benussi wrote: Anyone have any ideas where on earth I put my class that implements the LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a context in my server.xml. The context is in WEB-INF/web.xml as its a webapp specific listener, NOT a global server thing. See my article http://www.hibernate.org/301.html as an example (when used with hibernate) -- Darryl L. Miles - 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] . -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem Bringing up Admin
All of the dependencies appear to be valid. I can bring up http://localhost:8080 and go into the manager and the examples, but not admin. Also, the msh service that I am installing Tomcat for is not working in the same fashion. I figure that the users on this list are probably a lot more familiar with the admin servlet then Hermes MSH. Anyone have any idea what would give me these dependency errors? Thanks, Ryan Peddireddy Srikanth wrote: hmm, i dont think struts need to be downloaded seperately are u using JDK 1.4 or 1.5 ?? if u r using 1.4 u have to download compatabliity package and configure its contents in ur tomcat installation by following the steps in Running.txt On 7/26/05, J. Ryan Kelley [EMAIL PROTECTED] wrote: yeah, my user is added to tomcat-users.xml, but i don't even get a prompt to attempt to loginI have a feeling that some of my dependencies are not complete. I never installed struts, but there is a struts.jar file in my $CATALINA_HOME/server/webapps/admin/WEB-INF/lib directory...the reason that i think this is some of the following entries I found in my catalina.out log file ... ... Jul 25, 2005 9:18:53 PM org.apache.struts.action.ActionServlet init SEVERE: Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency. java.lang.NoClassDefFoundError: org/apache/commons/modeler/Registry at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:1655) at java.lang.Class.getMethod0(Class.java:1901) at java.lang.Class.getMethod(Class.java:984) at org.apache.commons.beanutils.MethodUtils.getMatchingAccessibleMethod(MethodUtils.java:535) at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:209) at org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:585) at org.apache.commons.digester.Rule.end(Rule.java:228) at org.apache.commons.digester.Digester.endElement(Digester.java:1067) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1591) at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1140) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:326) at org.apache.webapp.admin.ApplicationServlet.init(ApplicationServlet.java:105) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091) at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:750) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:641) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:539) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499) at admin.login_jsp._jspService(login_jsp.java:66) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:238) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:446) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
Manager servlet to manage virtual hosts
Hi, I'm running TC 5.0.19 and have 8 virtual hosts on the box. Each virtual host has a default (/) context with it's app deployed. When I access tomcat on it's IP address on port 8080, I get the default tomcat root, with access to the admin and manager servlets. Whenever I access the manager servlet though, I can only administer the root host and not contexts within the virtual hosts. Essentially I need an easy mechanism to reload apps within the virtual hosts (wither via cmd line or www interface) without restarting tomcat or affecting the deployments on the other virtual hosts. Any ideas on how I can best achieve this? Thanks. Manik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tomcat 5 - apache 2 - ldap
Hi, I need to setup the following system: - Tomcat 5.5.9 - Apache 2 (using mod_jk) - Redhat 7.3 - User authentication against Ldap (using OpenLdap) - Single sign-on (e.g. if the user is authenticated for entering a web application he will not have to authenticate again when browsing a PHP page) - Form-based authentication (login page) I still need to figure out the following: - Should Tomcat or Apache do ldap authentication ? - How are credentials passed between Tomcat and Apache (to ensure single sign-on) ? Your help is appreciated. -- Nili Adoram - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Manager servlet to manage virtual hosts
You can do this with ant very nicely project name=Learning default=reloadContext basedir=. target name=reloadContext get dest=stop.txt src=http://localhost:8080/manager/stop?path=/Learning; username=adminUserName password=adminPassword/ loadfile property=STOPOUTPUT srcfile=stop.txt/loadfile echo${STOPOUTPUT}/echo delete file=stop.txt/delete get dest=start.txt src=http://localhost:8080/manager/start?path=/Learning; username=adminUserNAme password=adminPassword/ loadfile property=STARTOUTPUT srcfile=start.txt/loadfile echo${STARTOUTPUT}/echo delete file=start.txt/delete /target /project The only thing you need to change is the http://localhost:8080/manager/stop?path=/Learning; of it ... So if you want to do for www.manik.com for context /Learning Then it will be http://www.manik.com/manager/stop?path=/Learning and if you want to do for www.guru.com for context /Learning Then it will be http://www.guru.com/manager/stop?path=/Learning Hope you find this useful Regards Guru Guru Loves Tocmat and ant :) Gurumoorthy Raghupathy EMFS - Fidelity Investments International Regret for the things we did can be tempered by time; it is regret for the things we did not do that is inconsolable To: tomcat-user@jakarta.apache.org Subject: Manager servlet to manage virtual hosts Hi, I'm running TC 5.0.19 and have 8 virtual hosts on the box. Each virtual host has a default (/) context with it's app deployed. When I access tomcat on it's IP address on port 8080, I get the default tomcat root, with access to the admin and manager servlets. Whenever I access the manager servlet though, I can only administer the root host and not contexts within the virtual hosts. Essentially I need an easy mechanism to reload apps within the virtual hosts (wither via cmd line or www interface) without restarting tomcat or affecting the deployments on the other virtual hosts. Any ideas on how I can best achieve this? Thanks. Manik - 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 - apache 2 - ldap
Ask tomcat Because if sometime you change the webserver ( in the worst case ) then you don't need to change anything :) Tomcat has good support for OpenLdap ... ( I have been using it for 1 year ) Guru -Original Message- From: Nili Adoram [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 12:54 To: tomcat-user@jakarta.apache.org Subject: tomcat 5 - apache 2 - ldap Hi, I need to setup the following system: - Tomcat 5.5.9 - Apache 2 (using mod_jk) - Redhat 7.3 - User authentication against Ldap (using OpenLdap) - Single sign-on (e.g. if the user is authenticated for entering a web application he will not have to authenticate again when browsing a PHP page) - Form-based authentication (login page) I still need to figure out the following: - Should Tomcat or Apache do ldap authentication ? - How are credentials passed between Tomcat and Apache (to ensure single sign-on) ? Your help is appreciated. -- Nili Adoram - 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 - apache 2 - ldap
If you use Form-based authentication (login page) then tomcat needs to do it... Regards Guru -Original Message- From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 13:02 To: 'Tomcat Users List' Subject: RE: tomcat 5 - apache 2 - ldap Ask tomcat Because if sometime you change the webserver ( in the worst case ) then you don't need to change anything :) Tomcat has good support for OpenLdap ... ( I have been using it for 1 year ) Guru -Original Message- From: Nili Adoram [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 12:54 To: tomcat-user@jakarta.apache.org Subject: tomcat 5 - apache 2 - ldap Hi, I need to setup the following system: - Tomcat 5.5.9 - Apache 2 (using mod_jk) - Redhat 7.3 - User authentication against Ldap (using OpenLdap) - Single sign-on (e.g. if the user is authenticated for entering a web application he will not have to authenticate again when browsing a PHP page) - Form-based authentication (login page) I still need to figure out the following: - Should Tomcat or Apache do ldap authentication ? - How are credentials passed between Tomcat and Apache (to ensure single sign-on) ? Your help is appreciated. -- Nili Adoram - 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: tomcat 5 - apache 2 - ldap
What about single sign-on for web applications and PHP? Does tomcat delegate credentials back to Apache so Apache would not authenticate again? Thanks Nili On Wed, 27 Jul 2005 13:05:49 +0100, Raghupathy,Gurumoorthy [EMAIL PROTECTED] wrote: If you use Form-based authentication (login page) then tomcat needs to do it... Regards Guru -Original Message- From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 13:02 To: 'Tomcat Users List' Subject: RE: tomcat 5 - apache 2 - ldap Ask tomcat Because if sometime you change the webserver ( in the worst case ) then you don't need to change anything :) Tomcat has good support for OpenLdap ... ( I have been using it for 1 year ) Guru -Original Message- From: Nili Adoram [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 12:54 To: tomcat-user@jakarta.apache.org Subject: tomcat 5 - apache 2 - ldap Hi, I need to setup the following system: - Tomcat 5.5.9 - Apache 2 (using mod_jk) - Redhat 7.3 - User authentication against Ldap (using OpenLdap) - Single sign-on (e.g. if the user is authenticated for entering a web application he will not have to authenticate again when browsing a PHP page) - Form-based authentication (login page) I still need to figure out the following: - Should Tomcat or Apache do ldap authentication ? - How are credentials passed between Tomcat and Apache (to ensure single sign-on) ? Your help is appreciated. -- Nili Adoram ([EMAIL PROTECTED]) SEMPRE Team, RD Qlusters Inc. 972-3-6081976 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JNDI - TOMCAT
Hi List , This is actually problem with JNDI . I'm tring to connect to mysql database via JNDI in tomcat 5.5.9. First of all i installed tomcat 5.5.9 in my windows 2000 advance server machine and accrding to guide of http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html url , I have done every thng according to the article. my sql connector is mysql-connector-java-3.1.10-bin.jar C:\Tomcat\common\lib after all the steps get done , i pointed to the test.jsp but i got an error saying , DataSource invalid: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' === so then i surf the internet to findout a soloution , there are plenty of such issues and some closest solutions with crerating .war files , changing some parameters like that . http://www.theserverside.com/tss?service=direct/0/DiscussionThread/threadViewer.bookmark.linksp=l29795 but , i would like to ask from directly from jakarta.apache.org/tomcat , do u have sudgested a solution for this matter / problem ? is it a bug in that particular version ( 5.5.9 ) ? do i have to switched for another version ? is that problem of curruption of mysql connector ? can i findout any one who has already solved this issue ? I read well FAQ's rules and regulations . i agreed with that . and i think , this issue has discussed couple of times in this list. but i cant findout exactly how could be the solution was ! . Please help me , it's really appreciate if u guys can consider this problem deeply . Thanx in advance for Tomcat and the LIST , Kane. - Start your day with Yahoo! - make it your home page
Problem with Jasper-Need your help
Hi.I am new with Tomcat and JSP and I need your help. I am trying the following simple jsp: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTML HEAD TITLEJSP Expressions/TITLE /HEAD BODY H2JSP Expressions/H2 UL LICurrent time: %= new java.util.Date() % LIYour hostname: %= request.getRemoteHost() % LIYour session ID: %= session.getId() % LIThe CODEtestParam/CODE form parameter: %= request.getParameter(testParam) % /UL /BODY /HTML And I get this error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: The method handlePageException(Exception) in the type PageContext is not applicable for the arguments (Throwable) org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:382) org.apache.jasper.compiler.Compiler.compile(Compiler.java:280) org.apache.jasper.compiler.Compiler.compile(Compiler.java:259) org.apache.jasper.compiler.Compiler.compile(Compiler.java:247) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:544) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:302) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246) javax.servlet.http.HttpServlet.service(HttpServlet.java) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.1 logs. Can you help me? Thanks Panagiotis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Problem with Jasper-Need your help
%= request.getParameter(testParam) % may trow a null pointer so try %= request.getParameter(testParam) == null ? : request.getParameter(testParam) % Regards Guru -Original Message- From: Panagiotis Karvounis [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 13:23 To: tomcat-user@jakarta.apache.org Subject: Problem with Jasper-Need your help Hi.I am new with Tomcat and JSP and I need your help. I am trying the following simple jsp: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTML HEAD TITLEJSP Expressions/TITLE /HEAD BODY H2JSP Expressions/H2 UL LICurrent time: %= new java.util.Date() % LIYour hostname: %= request.getRemoteHost() % LIYour session ID: %= session.getId() % LIThe CODEtestParam/CODE form parameter: %= request.getParameter(testParam) % /UL /BODY /HTML And I get this error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: The method handlePageException(Exception) in the type PageContext is not applicable for the arguments (Throwable) org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3 28) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:382) org.apache.jasper.compiler.Compiler.compile(Compiler.java:280) org.apache.jasper.compiler.Compiler.compile(Compiler.java:259) org.apache.jasper.compiler.Compiler.compile(Compiler.java:247) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 44) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 96) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:302) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246) javax.servlet.http.HttpServlet.service(HttpServlet.java) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.1 logs. Can you help me? Thanks Panagiotis - 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]
302 for missing files?
I'm currently using Tomcat 4.1.24 on WXP. The behaviour that is baffling me, is that when a request goes out for a non existing physical file, TC returns a 302 (Moved temporarily = redirect) complete with a Location for redirection (which is a valid path an the entry point somewhere in the application). As a result, the application gets swamped with request of the redirection path (on a page with 4 missing images, there are 4 redirection requests). There is a filter in place on other URLs, and it is correctly not accessed by the request-that-gets-a-302. So: - Where does the 302 come from? - And how can Tomcat know a valid Location for the 302? The same application in production but then with Apache running before Tomcat, returns a correct 404. Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JNDI - TOMCAT
Don't use docs based on 4.1 when running 5.5. Use the 5.5 docs. The way JNDI resources are declared in 5.5 changed as compared to previous versions. The archives in the tomcat user list also talk about this too. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/index.html -Tim Kane Wilson wrote: Hi List , This is actually problem with JNDI . I'm tring to connect to mysql database via JNDI in tomcat 5.5.9. First of all i installed tomcat 5.5.9 in my windows 2000 advance server machine and accrding to guide of http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html url , I have done every thng according to the article. my sql connector is mysql-connector-java-3.1.10-bin.jar C:\Tomcat\common\lib after all the steps get done , i pointed to the test.jsp but i got an error saying , DataSource invalid: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' === so then i surf the internet to findout a soloution , there are plenty of such issues and some closest solutions with crerating .war files , changing some parameters like that . http://www.theserverside.com/tss?service=direct/0/DiscussionThread/threadViewer.bookmark.linksp=l29795 but , i would like to ask from directly from jakarta.apache.org/tomcat , do u have sudgested a solution for this matter / problem ? is it a bug in that particular version ( 5.5.9 ) ? do i have to switched for another version ? is that problem of curruption of mysql connector ? can i findout any one who has already solved this issue ? I read well FAQ's rules and regulations . i agreed with that . and i think , this issue has discussed couple of times in this list. but i cant findout exactly how could be the solution was ! . Please help me , it's really appreciate if u guys can consider this problem deeply . Thanx in advance for Tomcat and the LIST , Kane. - Start your day with Yahoo! - make it your home page - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: setting -Xss option and its impact on servlet threads
On Windows I believe it is 256K. Don't reduce it to 128K unless you are absolutely sure what you are doing. Also, sometimes when the JVM does run it trouble allocating stack correctly, it may throw an exception (actually it may be an OutOfMemoryError) 'can't create new native thread' It happened to us in our application when we used the -Xss parameter to override the default stack size to 128K. Regards... Arup Vidyerthy -Original Message- From: Darryl L. Miles [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 12:03 To: Tomcat Users List Subject: Re: setting -Xss option and its impact on servlet threads Peddireddy Srikanth wrote: 1) what is the default stack size for Sun JVM on windows (Win 2003 to be more specefic)?? Dont know. 2) Will this setting affect both normal threads and the servlet threads created by tomcat?? or only normal threads? I believe there is a 1:1 corelation between all Java application threads, be they Servlet or normal threads. That is to say a Servlet thread uses exactly 1 Java thread. 3) If I set that to, say 128K , and if some of my thread (servlet or normal) needed more stack space than this in any case what happens (obvious answer for this would be that thread execution would fail but I want to know it from some one who experienced it) Are you able to change the stack size on a per Java Thread basis? If the underlying JVM uses kernel level threads and stack arrangement in a 1:1 fashion (unlikely from the observations I've seen), an unmapped page/area is usualy left at the end of the stack space if this is touched (read or write) the application will get a terminal signal and the entire JVM forced to exit just like it would accessing any other bit of invalid memory. However as JVM is a sandbox and it can know the amount of stack space a method needs before its invoked it is completely possible for it to be able to check/test its virtual Java stack has enough space left in the CPU instruction stack as there does not need to be 1:1 to the Java execution stack. Its possible for a JVM to implement its Java code execution stack completely within the operating system heap area. I dont believe Java in general needs a large java execution stack as all arrays are implemented as object allocations that come from the heap. So its not like the C language where you can have a few Kb byte array on a whim, in Java it just has to store the pointers to that array as a local variable in the java execution stack. I would be very interested to understand how Sun's JVM application stack works and its interactions with OS level threads, stacks and address space applications. With platform level threads there is a clear trade off with thread stack size and number of available threads, amount of available heap and number of library / file mappings (when working with 32bit CPUs at least). They all squeeze each other for their bit of address space but in Java this does not seem to be the case so much. -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Placing a LifecycleListener in my server.xml
Thanks Darryl I have followed this guide but don't know how to add the modify the server.xml I attached to reflect this. Also are you saying I should put the class that implements the listener in the server/classes? I am fine with this but wasn't sure if it would all get loaded together as the class is a Singleton that the rest of my code talks to and need to be sure it will have access to the same class instance in the JVM. -Original Message- From: Darryl L. Miles [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 12:10 To: Tomcat Users List Subject: Re: Placing a LifecycleListener in my server.xml Sorry did not read properly.. Have you tried: for JARs: $CATALINA_HOME/server/lib or $CATALINA_HOME/common/lib for .class: $CATALINA_HOME/server/classes or $CATALINA_HOME/common/classes From: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html *Lifecycle Listeners* If you have implemented a Java object that needs to know when this *Context* is started or stopped, you can declare it by nesting a *Listener* element inside this element. The class name you specify must implement the |org.apache.catalina.LifecycleListener| interface, and it will be notified about the occurrence of the coresponding lifecycle events. Configuration of such a listener looks like this: Context path=/examples ... ... Listener className=com.mycompany.mypackage.MyListener ... ... /Context Note that a Listener can have any number of additional properties that may be configured from this element. Attribute names are matched to corresponding JavaBean property names using the standard property method naming patterns. Mark Benussi wrote: Thanks Darryl but I need to implement a LifecycleListener. You have implemented a ServletContextListener which only gets called when the Content is started. I need to know when its finished, which is why I am using a LifecycleListener which should be placed in the server.xml Original Message Follows From: Darryl L. Miles [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: Tomcat Users List tomcat-user@jakarta.apache.org Subject: Re: Placing a LifecycleListener in my server.xml Date: Wed, 27 Jul 2005 11:47:17 +0100 Mark Benussi wrote: Anyone have any ideas where on earth I put my class that implements the LifecycleListener (In a jar in my WEB-INF/lib) as I don't seem to have a context in my server.xml. The context is in WEB-INF/web.xml as its a webapp specific listener, NOT a global server thing. See my article http://www.hibernate.org/301.html as an example (when used with hibernate) -- Darryl L. Miles - 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] . -- Darryl L. Miles M: 07968 320 114 - 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: JNDI - TOMCAT ------ success
Tim , it was success. thanx million. earlier i referred 5.0 docs. anyway it was my fault. again i would like to thank you Tim. It is great help Kane. Tim Funk [EMAIL PROTECTED] wrote: Don't use docs based on 4.1 when running 5.5. Use the 5.5 docs. The way JNDI resources are declared in 5.5 changed as compared to previous versions. The archives in the tomcat user list also talk about this too. http://jakarta.apache.org/tomcat/tomcat-5.5-doc/index.html -Tim Kane Wilson wrote: Hi List , This is actually problem with JNDI . I'm tring to connect to mysql database via JNDI in tomcat 5.5.9. First of all i installed tomcat 5.5.9 in my windows 2000 advance server machine and accrding to guide of http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html url , I have done every thng according to the article. my sql connector is mysql-connector-java-3.1.10-bin.jar C:\Tomcat\common\lib after all the steps get done , i pointed to the test.jsp but i got an error saying , DataSource invalid: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' === so then i surf the internet to findout a soloution , there are plenty of such issues and some closest solutions with crerating .war files , changing some parameters like that . http://www.theserverside.com/tss?service=direct/0/DiscussionThread/threadViewer.bookmark.linksp=l29795 but , i would like to ask from directly from jakarta.apache.org/tomcat , do u have sudgested a solution for this matter / problem ? is it a bug in that particular version ( 5.5.9 ) ? do i have to switched for another version ? is that problem of curruption of mysql connector ? can i findout any one who has already solved this issue ? I read well FAQ's rules and regulations . i agreed with that . and i think , this issue has discussed couple of times in this list. but i cant findout exactly how could be the solution was ! . Please help me , it's really appreciate if u guys can consider this problem deeply . Thanx in advance for Tomcat and the LIST , Kane. - Start your day with Yahoo! - make it your home page - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Re: Manager servlet to manage virtual hosts
Hi there. Yeah, this is pretty much what I want, only the problem is: www.myserver.com:8080/manager exists, but www.myvh_1.com:8080/ manager and www.myvh_2.com:8080/manager, etc. does not exist ... For some reason the manager servlet is not avbl on my virtual hosts and the manager on the main host can only manage contexts in that host. Cheers, Manik On 27 Jul 2005, at 12:59, Raghupathy,Gurumoorthy wrote: You can do this with ant very nicely project name=Learning default=reloadContext basedir=. target name=reloadContext get dest=stop.txt src=http://localhost:8080/manager/stop?path=/Learning; username=adminUserName password=adminPassword/ loadfile property=STOPOUTPUT srcfile=stop.txt/loadfile echo${STOPOUTPUT}/echo delete file=stop.txt/delete get dest=start.txt src=http://localhost:8080/manager/start?path=/Learning; username=adminUserNAme password=adminPassword/ loadfile property=STARTOUTPUT srcfile=start.txt/loadfile echo${STARTOUTPUT}/echo delete file=start.txt/delete /target /project The only thing you need to change is the http://localhost:8080/manager/stop?path=/Learning; of it ... So if you want to do for www.manik.com for context /Learning Then it will be http://www.manik.com/manager/stop?path=/Learning and if you want to do for www.guru.com for context /Learning Then it will be http://www.guru.com/manager/stop?path=/Learning Hope you find this useful Regards Guru Guru Loves Tocmat and ant :) Gurumoorthy Raghupathy EMFS - Fidelity Investments International Regret for the things we did can be tempered by time; it is regret for the things we did not do that is inconsolable To: tomcat-user@jakarta.apache.org Subject: Manager servlet to manage virtual hosts Hi, I'm running TC 5.0.19 and have 8 virtual hosts on the box. Each virtual host has a default (/) context with it's app deployed. When I access tomcat on it's IP address on port 8080, I get the default tomcat root, with access to the admin and manager servlets. Whenever I access the manager servlet though, I can only administer the root host and not contexts within the virtual hosts. Essentially I need an easy mechanism to reload apps within the virtual hosts (wither via cmd line or www interface) without restarting tomcat or affecting the deployments on the other virtual hosts. Any ideas on how I can best achieve this? Thanks. Manik - 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: Problem with Jasper-Need your help
It didn't work again! I have almost the same problem with all my JSP pages(Servlets work ok). I think is a Tomcat problem;The method handlePageException(Exception) in the type PageContext is not applicable for the arguments (Throwable) I went to servlet code produced and I changed catch(Throwable t) with catch(Exception t) and the java file was compiled succesfully with javac. Thanks for help Panagiotis On 7/27/05, Raghupathy,Gurumoorthy [EMAIL PROTECTED] wrote: %= request.getParameter(testParam) % may trow a null pointer so try %= request.getParameter(testParam) == null ? : request.getParameter(testParam) % Regards Guru -Original Message- From: Panagiotis Karvounis [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 13:23 To: tomcat-user@jakarta.apache.org Subject: Problem with Jasper-Need your help Hi.I am new with Tomcat and JSP and I need your help. I am trying the following simple jsp: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTML HEAD TITLEJSP Expressions/TITLE /HEAD BODY H2JSP Expressions/H2 UL LICurrent time: %= new java.util.Date() % LIYour hostname: %= request.getRemoteHost() % LIYour session ID: %= session.getId() % LIThe CODEtestParam/CODE form parameter: %= request.getParameter(testParam) % /UL /BODY /HTML And I get this error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: The method handlePageException(Exception) in the type PageContext is not applicable for the arguments (Throwable) org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3 28) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:382) org.apache.jasper.compiler.Compiler.compile(Compiler.java:280) org.apache.jasper.compiler.Compiler.compile(Compiler.java:259) org.apache.jasper.compiler.Compiler.compile(Compiler.java:247) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 44) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 96) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:302) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246) javax.servlet.http.HttpServlet.service(HttpServlet.java) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.1 logs. Can you help me? Thanks Panagiotis - 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: Manager servlet to manage virtual hosts
You can copy the manager.xml ( context definition ) from the www.myserver.com:8080/ webapps directory to the virtualhost webapps directory and restart tomcat ... Then it will be available ... Regards Guru -Original Message- From: Manik Surtani [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 14:05 To: Tomcat Users List Subject: Re: Manager servlet to manage virtual hosts Hi there. Yeah, this is pretty much what I want, only the problem is: www.myserver.com:8080/manager exists, but www.myvh_1.com:8080/ manager and www.myvh_2.com:8080/manager, etc. does not exist ... For some reason the manager servlet is not avbl on my virtual hosts and the manager on the main host can only manage contexts in that host. Cheers, Manik On 27 Jul 2005, at 12:59, Raghupathy,Gurumoorthy wrote: You can do this with ant very nicely project name=Learning default=reloadContext basedir=. target name=reloadContext get dest=stop.txt src=http://localhost:8080/manager/stop?path=/Learning; username=adminUserName password=adminPassword/ loadfile property=STOPOUTPUT srcfile=stop.txt/loadfile echo${STOPOUTPUT}/echo delete file=stop.txt/delete get dest=start.txt src=http://localhost:8080/manager/start?path=/Learning; username=adminUserNAme password=adminPassword/ loadfile property=STARTOUTPUT srcfile=start.txt/loadfile echo${STARTOUTPUT}/echo delete file=start.txt/delete /target /project The only thing you need to change is the http://localhost:8080/manager/stop?path=/Learning; of it ... So if you want to do for www.manik.com for context /Learning Then it will be http://www.manik.com/manager/stop?path=/Learning and if you want to do for www.guru.com for context /Learning Then it will be http://www.guru.com/manager/stop?path=/Learning Hope you find this useful Regards Guru Guru Loves Tocmat and ant :) Gurumoorthy Raghupathy EMFS - Fidelity Investments International Regret for the things we did can be tempered by time; it is regret for the things we did not do that is inconsolable To: tomcat-user@jakarta.apache.org Subject: Manager servlet to manage virtual hosts Hi, I'm running TC 5.0.19 and have 8 virtual hosts on the box. Each virtual host has a default (/) context with it's app deployed. When I access tomcat on it's IP address on port 8080, I get the default tomcat root, with access to the admin and manager servlets. Whenever I access the manager servlet though, I can only administer the root host and not contexts within the virtual hosts. Essentially I need an easy mechanism to reload apps within the virtual hosts (wither via cmd line or www interface) without restarting tomcat or affecting the deployments on the other virtual hosts. Any ideas on how I can best achieve this? Thanks. Manik - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setting -Xss option and its impact on servlet threads
Thanx for the reply As far as I know if thread space provided insufficient for JVM it should throw stack overflow exception is'nt ?? Ok Will this approach works: say I reduced stack size to 128 K Then I invoked every possible feature of my web app to see whether any of my modules are failing bcoz of reduced stack space. If every part of my app works fine I will commit on my current setting for -Xss If something fails, I will increase it and again run the test but my one concern is, whether all this effort will yeld me any improvement or not? regards Srikanth On 7/27/05, Arup Vidyerthy [EMAIL PROTECTED] wrote: On Windows I believe it is 256K. Don't reduce it to 128K unless you are absolutely sure what you are doing. Also, sometimes when the JVM does run it trouble allocating stack correctly, it may throw an exception (actually it may be an OutOfMemoryError) 'can't create new native thread' It happened to us in our application when we used the -Xss parameter to override the default stack size to 128K. Regards... Arup Vidyerthy -Original Message- From: Darryl L. Miles [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 12:03 To: Tomcat Users List Subject: Re: setting -Xss option and its impact on servlet threads Peddireddy Srikanth wrote: 1) what is the default stack size for Sun JVM on windows (Win 2003 to be more specefic)?? Dont know. 2) Will this setting affect both normal threads and the servlet threads created by tomcat?? or only normal threads? I believe there is a 1:1 corelation between all Java application threads, be they Servlet or normal threads. That is to say a Servlet thread uses exactly 1 Java thread. 3) If I set that to, say 128K , and if some of my thread (servlet or normal) needed more stack space than this in any case what happens (obvious answer for this would be that thread execution would fail but I want to know it from some one who experienced it) Are you able to change the stack size on a per Java Thread basis? If the underlying JVM uses kernel level threads and stack arrangement in a 1:1 fashion (unlikely from the observations I've seen), an unmapped page/area is usualy left at the end of the stack space if this is touched (read or write) the application will get a terminal signal and the entire JVM forced to exit just like it would accessing any other bit of invalid memory. However as JVM is a sandbox and it can know the amount of stack space a method needs before its invoked it is completely possible for it to be able to check/test its virtual Java stack has enough space left in the CPU instruction stack as there does not need to be 1:1 to the Java execution stack. Its possible for a JVM to implement its Java code execution stack completely within the operating system heap area. I dont believe Java in general needs a large java execution stack as all arrays are implemented as object allocations that come from the heap. So its not like the C language where you can have a few Kb byte array on a whim, in Java it just has to store the pointers to that array as a local variable in the java execution stack. I would be very interested to understand how Sun's JVM application stack works and its interactions with OS level threads, stacks and address space applications. With platform level threads there is a clear trade off with thread stack size and number of available threads, amount of available heap and number of library / file mappings (when working with 32bit CPUs at least). They all squeeze each other for their bit of address space but in Java this does not seem to be the case so much. -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.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]
Instantiating an Application Scoped Bean
Hi, I need some help on the following scenario: As soon as I start my tomcat server, I need to populate an application-scoped bean which will have values from the database. Thereafter I should be able to access the bean across all JSP pages using the jsp:useBean ... ...scope=application/ tag. It'll be great if you guys can tell me how to initialize this bean at server startup. Any specific web.xml entry to be recorded to map to the servlet which does the DB operation? Thanks! Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments.
RE: Instantiating an Application Scoped Bean
Define a servlet say com.guru.servlet.StartUpServlet And in the StartupServlet Overide the init() Method ... init() { super.init() getServletContext().setAttribute(MyBean, MyBean); } And in WEB.XML servlet servlet-nameStartUpServlet/servlet-name servlet-classcom.guru.servlet.StartUpServlet/servlet-class load-on-startup1/load-on-startup /servlet Regards Guru -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 14:41 To: tomcat-user@jakarta.apache.org Subject: Instantiating an Application Scoped Bean Hi, I need some help on the following scenario: As soon as I start my tomcat server, I need to populate an application-scoped bean which will have values from the database. Thereafter I should be able to access the bean across all JSP pages using the jsp:useBean ... ...scope=application/ tag. It'll be great if you guys can tell me how to initialize this bean at server startup. Any specific web.xml entry to be recorded to map to the servlet which does the DB operation? Thanks! Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Instantiating an Application Scoped Bean
You need to do something like this: servlet servlet-nameApplicationStartup/servlet-name display-nameStartUp Servlet/display-name servlet-classa.startup.ApplicationStartup/servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameApplicationStartup/servlet-name url-pattern/startup/url-pattern /servlet-mapping This tells tomcat to run that servlet when Tomcat first intialises the context. You can put all your initialisation stuff there I guess. Regards... Arup Vidyerthy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 14:41 To: tomcat-user@jakarta.apache.org Subject: Instantiating an Application Scoped Bean Hi, I need some help on the following scenario: As soon as I start my tomcat server, I need to populate an application-scoped bean which will have values from the database. Thereafter I should be able to access the bean across all JSP pages using the jsp:useBean ... ...scope=application/ tag. It'll be great if you guys can tell me how to initialize this bean at server startup. Any specific web.xml entry to be recorded to map to the servlet which does the DB operation? Thanks! Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. ___ 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]
Re: Instantiating an Application Scoped Bean
One possible solution would be : U create a servlet which loads on startup. While defining servlets in web.xml set the load on startup attribute for some servlet and that servlet will be loaded/executed automatically by container at startup U can write ur code for loading and populating the bean in that servlet and u can store that bean in ServletContext object (if iam not wrong) sothat u can acces it else where servlet servlet-nameLoadingServlet/servlet-name servlet-classLoadingServlet/servlet-class load-on-startup2/load-on-startup /servlet regards Srikanth On 7/27/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I need some help on the following scenario: As soon as I start my tomcat server, I need to populate an application-scoped bean which will have values from the database. Thereafter I should be able to access the bean across all JSP pages using the jsp:useBean ... ...scope=application/ tag. It'll be great if you guys can tell me how to initialize this bean at server startup. Any specific web.xml entry to be recorded to map to the servlet which does the DB operation? Thanks! Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Web application directory structure
You're right in that it should work. I can only guess the most likely reason this might fail is your web.xml configuration. Look for servlet mappings that might catch the data/test1.html url. Your log files should have more information. Also check to be sure the tomcat service has read privilege on the file and it's directory. --David Joe Becknell wrote: I'm new to Tomcat and having a problem I thought someone could help me with. I have an application with servlet installed under webapps. I can run the servlet without problems. The servlet creates a page that gets sent to the browser with some links to some (HTML and XML) data files on it. When I click on one of the links, I get a 404 (resource not available) error, even though the file exists under my web application location. My setup is (basically, I'm not at work, so I can't remember it exactly): webapps\testapp\index.html webapps\testapp\WEB-INF\web.xml webapps\testapp\WEB-INF\classes\servlet.class webapps\testapp\WEB-INF\src\servlet.java webapps\testapp\data\test1.html in my server.xml config file I have: Context path=/testapp docBase=testapp debug=0 reloadable=true although I don't think I need this since my app is located under the webapps directory. Navigating to: http://localhost:8080/testapp/index.html works fine, but navigating to http://localhost:8080/testapp/data/test1.html gives me the 404 error. I was under the imression that I could place files anywhere under the application root (docBase) directory. Am I missing something here. Configuration oversight? Thanks for any information. Joe. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ho to check if forward-target exists?
Hello, I can start a forward like this e.g. through a filter: request.getRequestDispatcher(/test.html).forward(request, response); But how can I check if the ressource really exists? request.getRequestDispatcher(/test.html) always gives me a RequestDispatcher reference. Or is it possible to get the response-code somehow to check if the forward resulted in a file-not-found error? Regards Marten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ho to check if forward-target exists?
If you are looking for a physical resource use if (null==servletContext.getResource()) { ... yes it exists ... } -Tim Marten Lehmann wrote: Hello, I can start a forward like this e.g. through a filter: request.getRequestDispatcher(/test.html).forward(request, response); But how can I check if the ressource really exists? request.getRequestDispatcher(/test.html) always gives me a RequestDispatcher reference. Or is it possible to get the response-code somehow to check if the forward resulted in a file-not-found error? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Instantiating an Application Scoped Bean
Please don't use servlets and the load-on-startup to do this. It is a kludge. Use a ServletContextListener(). They were intended for just this type of need. -Tim Raghupathy,Gurumoorthy wrote: Define a servlet say com.guru.servlet.StartUpServlet And in the StartupServlet Overide the init() Method ... init() { super.init() getServletContext().setAttribute(MyBean, MyBean); } And in WEB.XML servlet servlet-nameStartUpServlet/servlet-name servlet-classcom.guru.servlet.StartUpServlet/servlet-class load-on-startup1/load-on-startup /servlet Regards Guru -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 14:41 To: tomcat-user@jakarta.apache.org Subject: Instantiating an Application Scoped Bean Hi, I need some help on the following scenario: As soon as I start my tomcat server, I need to populate an application-scoped bean which will have values from the database. Thereafter I should be able to access the bean across all JSP pages using the jsp:useBean ... ...scope=application/ tag. It'll be great if you guys can tell me how to initialize this bean at server startup. Any specific web.xml entry to be recorded to map to the servlet which does the DB operation? Thanks! Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. - 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]
Tutorials for 1.2.7 features
Hi All. Can anybody point me to tutorials or any other kind of writeups on new Struts features - i.e., using POJO instead ActionForms, etc. I've seen this http://raibledesigns.com/comments/rd/sunsets/colorado_software_summit_spring_and#comment3 but I'd like to find something more descriptive if it's possible. Thanks in advance, Sergey. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to set index.faces as welcome-file
Hello, thanks for your class. I'm not usig it (and I guess its partially wrong, because you can't simply append the welcome-file the the path-info), but it inspired me to create a better way: Through a filter. I attached the filter-class, you would integrate it in the web.xml as follows: filter filter-nameFakeIndexFilter/filter-name filter-classweb.filter.FakeIndexFilter/filter-class /filter filter-mapping filter-nameFakeIndexFilter/filter-name url-pattern/*/url-pattern /filter-mapping I didn't put a GPL-notice in there, but I guess it's useful for everyone and maybe it can be included in the Tomcat distribution as well. The way it works is pretty simple: If the servletpath doesn't end with /, the request is just passed to the next filter. If it does end with /, it will be checked if the file index.jsp exists, because every .faces-file will be mapped to the according .jsp-file. If the .jsp-file exists, a forward to servletpath+index.faces will be done. Otherwise, the request is passed to the next filter, where you would possibly get the directory listing in the end. Regards Marten package web.filter; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import java.io.IOException; /** * Created by IntelliJ IDEA. * User: Marten * Date: 27.07.2005 * Time: 15:22:56 */ public class FakeIndexFilter implements Filter { private FilterConfig filterConfig; public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = (HttpServletRequest) request; boolean debug = true; if (debug) System.out.println(FakeIndexFilter: + req.getServletPath()); if (req.getServletPath().endsWith(/)) { if (debug) System.out.println(trying to append index.faces); if (filterConfig.getServletContext().getResource(req.getServletPath() + index.jsp) == null) { if (debug) System.out.println(not found); chain.doFilter(request, response); } else { System.out.println(found - forward); req.getRequestDispatcher(req.getServletPath() + index.faces).forward(request, response); } } else { chain.doFilter(request, response); } } public void init(FilterConfig filterConfig) { this.filterConfig = filterConfig; } public void destroy() { } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Placing a LifecycleListener in my server.xml
Mark Benussi wrote: Thanks Darryl I have followed this guide but don't know how to add the modify the server.xml I attached to reflect this. Also are you saying I should put the class that implements the listener in the server/classes? I am fine with this but wasn't sure if it would all get loaded together as the class is a Singleton that the rest of my code talks to and need to be sure it will have access to the same class instance in the JVM. From the example you quoted right at the top there is: [...SNIP...] Server port=8005 shutdown=SHUTDOWN debug=0 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener debug=0/ Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener debug=0/ GlobalNamingResources [...SNIP...] So you just add your: Listener className=my.domain.class.LifecycleListener/ To confirm location grep jar -tvf tomcat-foobar.jar from $CATALINA_HOME/servers/lib for mbeans/ServerLifecycleListener.class. As for ensuring the SAME instance of the Singleton is found, maybe you must put it into $CATALINA_HOME/common/lib not server/lib! Please read up on the differencies for clarification. It is my understanding that only the Tomcat Application Server itself loads classes from $CATALINA_HOME/servers/* and that all librarys in $CATALINA_HOME/common/* are available to both the AS and the WEBAPP contexts. Just make sure you dont override the class by also installing it into the WEB-INF/* area. If this does not work maybe JNDI is the only way, that is bind the instance to a JNDI path at the first lifecycle event then all the webapps can lookup and use it (if simplistic class loading does not work). I have not used this method before as I found other ways to do what I needed, I wanted to deploy the listener within my webapp. -Original Message- From: Darryl L. Miles [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 12:10 To: Tomcat Users List Subject: Re: Placing a LifecycleListener in my server.xml Sorry did not read properly.. Have you tried: for JARs: $CATALINA_HOME/server/lib or $CATALINA_HOME/common/lib for .class: $CATALINA_HOME/server/classes or $CATALINA_HOME/common/classes From: http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html *Lifecycle Listeners* If you have implemented a Java object that needs to know when this *Context* is started or stopped, you can declare it by nesting a *Listener* element inside this element. The class name you specify must implement the |org.apache.catalina.LifecycleListener| interface, and it will be notified about the occurrence of the coresponding lifecycle events. Configuration of such a listener looks like this: Context path=/examples ... ... Listener className=com.mycompany.mypackage.MyListener ... ... /Context Note that a Listener can have any number of additional properties that may be configured from this element. Attribute names are matched to corresponding JavaBean property names using the standard property method naming patterns. -- Darryl L. Miles - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tutorials for 1.2.7 features
From: Sergey Pariev [EMAIL PROTECTED] Can anybody point me to tutorials or any other kind of writeups on new Struts features - i.e., using POJO instead ActionForms, etc. I've seen this http://raibledesigns.com/comments/rd/sunsets/colorado_software_summit_spring_and#comment3 but I'd like to find something more descriptive if it's possible. You can check the release notes for 1.2.7 for more information: http://struts.apache.org/userGuide/release-notes-1.2.7.html If you have questions about specific features, please join us on the Struts user list (you've posted to tomcat-user). Subscription info is here: http://struts.apache.org/mail.html -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tutorials for 1.2.7 features
Sorry, I have already subscribed to struts list - it's just happen to be in the same mail folder so I missed the right list :) . I'll rewrite my questions to be more spicific and post them to the struts list later. Thanks, Sergey. Wendy Smoak wrote: From: Sergey Pariev [EMAIL PROTECTED] Can anybody point me to tutorials or any other kind of writeups on new Struts features - i.e., using POJO instead ActionForms, etc. I've seen this http://raibledesigns.com/comments/rd/sunsets/colorado_software_summit_spring_and#comment3 but I'd like to find something more descriptive if it's possible. You can check the release notes for 1.2.7 for more information: http://struts.apache.org/userGuide/release-notes-1.2.7.html If you have questions about specific features, please join us on the Struts user list (you've posted to tomcat-user). Subscription info is here: http://struts.apache.org/mail.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Linking/forwarding GET requests using Default servlet or other Tomcat feature
I'm running a stand-alone (no Apache front-end) TC 5.0.19 server on a WinXP box. I have a webapp that has a /teams directory that contains gameScores.htm, teamStandings.htm and scoreForm.htm. I also have a /playoffs directory (can you tell this is a sports-related site?) directory that has the **exact same files**. Now, I'd like to keep a single copy of the 3 files in one directory and have some servlet-mappings in web.xml that would forward the request from /playoffs to /teams **WITHOUT** the HTTP client being aware of a 'redirect.' That is, I don't want to issue an HTTP redirect, and WinXP doesn't have file linking like Unix. Is there some hook in the Default servlet (or other TC-supplied class) that would allow one to do something like the following: servlet servlet-nameplayoffs/servlet-name servlet-class...DefaultServlet (or whatever)/servlet-class init-param param-nameFORWARD/param-name param-value/teams/param-value /init-param /servlet servlet-mapping servlet-nameplayoffs/servlet-name url-pattern/playoffs/*/url-pattern /servlet-mapping The idea is I'm being very lazy and hoping that there is a feature in the default servlet (or other TC-supplied filter/class) that will allow this without me having to write same. (Of, if someone has some code they'd like to share...) Thanks.
URLConnection and form based authentication (j_username)
I cannot get this to work. It works for all other sites besides ones that have j_username j_password. It always comes back to the login page. I see other messageboards via google that have the same problem, but there is no answer. form method=POST action='/cpvs/login' input type=hidden name=auth value=securid / table border=0 cellspacing=5 tr th align=rightUsername:/th td align=leftinput type=text name=j_username/td /tr tr th align=rightPassword:/th td align=leftinput type=password name=j_password /td /tr tr td align=rightinput type=submit value=Log In name=login /td td align=leftinput type=reset/td /tr /table /form /div /center Anthony Smith Programmer Analyst International Technologies 901-263-8953 Having education and talent doesn't make you better than the world... it makes you responsible for it!
Re: Linking/forwarding GET requests using Default servlet or other Tomcat feature
On Wed, 2005-07-27 at 12:19, Rob Hunt wrote: I'm running a stand-alone (no Apache front-end) TC 5.0.19 server on a WinXP box. I have a webapp that has a /teams directory that contains gameScores.htm, teamStandings.htm and scoreForm.htm. I also have a /playoffs directory (can you tell this is a sports-related site?) directory that has the **exact same files**. Now, I'd like to keep a single copy of the 3 files in one directory and have some servlet-mappings in web.xml that would forward the request from /playoffs to /teams **WITHOUT** the HTTP client being aware of a 'redirect.' That is, I don't want to issue an HTTP redirect, and WinXP doesn't have file linking like Unix. Is there some hook in the Default servlet (or other TC-supplied class) that would allow one to do something like the following: servlet servlet-nameplayoffs/servlet-name servlet-class...DefaultServlet (or whatever)/servlet-class init-param param-nameFORWARD/param-name param-value/teams/param-value /init-param /servlet servlet-mapping servlet-nameplayoffs/servlet-name url-pattern/playoffs/*/url-pattern /servlet-mapping The idea is I'm being very lazy and hoping that there is a feature in the default servlet (or other TC-supplied filter/class) that will allow this without me having to write same. (Of, if someone has some code they'd like to share...) The servlet-entry in web.xml can take a jsp-page parameter instead of a servlet-class If you define your JSP as a servlet, you can create as many mappings to it as you like. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Linking/forwarding GET requests using Default servlet or other Tomcat feature
jsp-file that is. On Wed, 2005-07-27 at 12:36, Ben Souther wrote: On Wed, 2005-07-27 at 12:19, Rob Hunt wrote: I'm running a stand-alone (no Apache front-end) TC 5.0.19 server on a WinXP box. I have a webapp that has a /teams directory that contains gameScores.htm, teamStandings.htm and scoreForm.htm. I also have a /playoffs directory (can you tell this is a sports-related site?) directory that has the **exact same files**. Now, I'd like to keep a single copy of the 3 files in one directory and have some servlet-mappings in web.xml that would forward the request from /playoffs to /teams **WITHOUT** the HTTP client being aware of a 'redirect.' That is, I don't want to issue an HTTP redirect, and WinXP doesn't have file linking like Unix. Is there some hook in the Default servlet (or other TC-supplied class) that would allow one to do something like the following: servlet servlet-nameplayoffs/servlet-name servlet-class...DefaultServlet (or whatever)/servlet-class init-param param-nameFORWARD/param-name param-value/teams/param-value /init-param /servlet servlet-mapping servlet-nameplayoffs/servlet-name url-pattern/playoffs/*/url-pattern /servlet-mapping The idea is I'm being very lazy and hoping that there is a feature in the default servlet (or other TC-supplied filter/class) that will allow this without me having to write same. (Of, if someone has some code they'd like to share...) The servlet-entry in web.xml can take a jsp-page parameter instead of a servlet-class If you define your JSP as a servlet, you can create as many mappings to it as you like. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison Co. CONFIDENTIALITY NOTICE: This e-mail message, and any accompanying documents, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, distribution or copying is prohibited. If you are not the intended recipient, please contact our office by email or by telephone at (508) 747-7261 and immediately destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
injecting a new request within a filter
Hello, from within a filter, I'm trying to do the following: request.getRequestDispatcher(req.getServletPath() + index.faces).forward(request, response); This works generally fine. The problem is, that attached filters simply aren't processed for this request. I have two filters in series, the first filter is doing the above forward-request on a conditionally basis and the second filter is never called in this case. How can I re-inject the request, so that either both filters are passed again, or at least the second filter (and maybe others following) is processed? Regards Marten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Web application directory structure
Are you using the autoDeploy or deployOnStartup feature (usually in the Host configuration in server.xml)? If you manually specify a Context and use one of the automatic deployment features, you're likely to have issues with your application; at least I did. Try setting both of those parameters to false, manually exploding your .war file, then restarting Tomcat. -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 27, 2005 6:55 AM To: Tomcat Users List Subject: Re: Web application directory structure You're right in that it should work. I can only guess the most likely reason this might fail is your web.xml configuration. Look for servlet mappings that might catch the data/test1.html url. Your log files should have more information. Also check to be sure the tomcat service has read privilege on the file and it's directory. --David Joe Becknell wrote: I'm new to Tomcat and having a problem I thought someone could help me with. I have an application with servlet installed under webapps. I can run the servlet without problems. The servlet creates a page that gets sent to the browser with some links to some (HTML and XML) data files on it. When I click on one of the links, I get a 404 (resource not available) error, even though the file exists under my web application location. My setup is (basically, I'm not at work, so I can't remember it exactly): webapps\testapp\index.html webapps\testapp\WEB-INF\web.xml webapps\testapp\WEB-INF\classes\servlet.class webapps\testapp\WEB-INF\src\servlet.java webapps\testapp\data\test1.html in my server.xml config file I have: Context path=/testapp docBase=testapp debug=0 reloadable=true although I don't think I need this since my app is located under the webapps directory. Navigating to: http://localhost:8080/testapp/index.html works fine, but navigating to http://localhost:8080/testapp/data/test1.html gives me the 404 error. I was under the imression that I could place files anywhere under the application root (docBase) directory. Am I missing something here. Configuration oversight? Thanks for any information. Joe. - 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: injecting a new request within a filter
1) You need to be running tomcat 5 2) See SRV.6.2.5 Filters and the RequestDispatcher in the servlet spec - it discusses exactly what you need to do. -Tim Marten Lehmann wrote: Hello, from within a filter, I'm trying to do the following: request.getRequestDispatcher(req.getServletPath() + index.faces).forward(request, response); This works generally fine. The problem is, that attached filters simply aren't processed for this request. I have two filters in series, the first filter is doing the above forward-request on a conditionally basis and the second filter is never called in this case. How can I re-inject the request, so that either both filters are passed again, or at least the second filter (and maybe others following) is processed? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
( URGENT Please ) tomcat connection refused
Dear all I am trying to create a secure connection between tomcat server and a browser. I have done exactly the same as the instructions on http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html but when I tried to connect on the port https://localhost:8443 , an alert popped up saying (( The connection was refused when attepting to contact localhost:8443 . So, I would be very grateful if anyone can let me know what is the problem ?? Thanks in advance Abdullah _ It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Best way to limit applications to specific ports
I'm trying to configure two different apps on the same server - the Manager app as well as our own. One of my requirements is to open 2 ports for our app and a third different port for the Manager. Any users connecting to the Manager port should not be able to access the other application and vice versa, though we will want to use the Manager against our application. Is there a recommended best practice for doing this? It seems I could do it by configuring multiple Services, each pointing to a different CATALINA_BASE, with exclusive Connectors defined. Am I on track? Are there any other (better) ways to do this? Thanks in advance. Brian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Clustering and the useDirtyFlag
I've been working with a cluster of tomcat servers and wanted to change the useDirtyFlag to false so that the session is replicated after every request whether or not it was changed. Here is my modified server.xml fragment: ---CUT--- Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster managerClassName=org.apache.catalina.cluster.session.DeltaManager expireSessionsOnShutdown=false useDirtyFlag=false ---END CUT--- After restarting the servers in the cluster, I noticed that the behavior was the same as with the flag set to true. Objects in the session quickly become out of sync across the multiple servers because they are getting modifed but setAttribute is not being called. I searched around google and the mail archive a bit but didn't find any references to people having trouble with this. Before I started digging in the clustering code, I thought I'd see if anyone has any idea as to whether or not I have the correct expectation of the useDirtyFlag or if there might be some other problem. I'm using Tomcat 5.5.9. Thanks Dennis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help with setting up aliases , it kind of works , but the getRealPath does not
Hello I will try to be brief I am running apache 2, tomcat 5 I currently have this configuration /home/topdomain= www.topdomain.com /home/topdomain/subdomain1 = sub1.topdomain.com /home/topdomain/subdomain2 = sub2.topdomain.com under each subdomain i have users. ie /home/topdomain/subdomain1/usera = http://sub1.topdomain.com/usera So this kind of works. All these subdomains, (I will actually have 5) all share the exact code, and i really do not want to have 5 exact instances of this running. The problem i am seeing getrealPath problems. For example, when i allow the user to upload a file, i take his virt dir and do a getrealPath to get the real physical path so i can upload it to the correct place. So if i am usera on b1.topdomain.com and do a String realRPPath = application.getRealPath(/+user.getDir()); I get /home/topdomain/usera and not /home/topdomain/subdomain1/usera I hope this makes sense in my server.xml i have Host name=www.topdomain.com http://www.topdomain.com/ debug=0 appBase=/home/topdomain unpackWARs=true Aliassub1.topdomain.com/Alias Aliassub2.topdomain.com/Alias /Host - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Web application directory structure
Thanks. I found out my problem. I wasn't going after the path with the correct case. I wasn't aware that Tomcat, by default, is case sensitive. Doohh! --- David Smith [EMAIL PROTECTED] wrote: You're right in that it should work. I can only guess the most likely reason this might fail is your web.xml configuration. Look for servlet mappings that might catch the data/test1.html url. Your log files should have more information. Also check to be sure the tomcat service has read privilege on the file and it's directory. --David Joe Becknell wrote: I'm new to Tomcat and having a problem I thought someone could help me with. I have an application with servlet installed under webapps. I can run the servlet without problems. The servlet creates a page that gets sent to the browser with some links to some (HTML and XML) data files on it. When I click on one of the links, I get a 404 (resource not available) error, even though the file exists under my web application location. My setup is (basically, I'm not at work, so I can't remember it exactly): webapps\testapp\index.html webapps\testapp\WEB-INF\web.xml webapps\testapp\WEB-INF\classes\servlet.class webapps\testapp\WEB-INF\src\servlet.java webapps\testapp\data\test1.html in my server.xml config file I have: Context path=/testapp docBase=testapp debug=0 reloadable=true although I don't think I need this since my app is located under the webapps directory. Navigating to: http://localhost:8080/testapp/index.html works fine, but navigating to http://localhost:8080/testapp/data/test1.html gives me the 404 error. I was under the imression that I could place files anywhere under the application root (docBase) directory. Am I missing something here. Configuration oversight? Thanks for any information. Joe. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
re: how do others deal with classloader not being recycled
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am assuming that this FAQ entry is still valid for Tomcat 5.5.9: Why does the memory usage increase when I redeploy a web application? Because the Classloader (and the Class objects it loaded) cannot be recycled. They are stored in the permanent heap generation by the JVM, and when you redepoy a new class loader is created, which loads another copy of all these classes. This can cause OufOfMemoryErrors eventually. This could explain why, when I redeploy my webapp many times, I eventually run out of PermMemory. I am curious what others do, in production, because of this issue? We are going to be doing some testing to see about optimizing the memory allocation, but I am curious how others handle this. Thanx. - -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC59l3ikQgpVn8xrARAjvhAJ0Xus3w6FptvBZhye3wmDbAWkv8ewCfbIZx CmT6TVS6E22dVdt4p6CyDiU= =Q+Kv -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Jasper-Need your help
So is there anybody that can help me? Please guys...I don't know what to do. On 7/27/05, Panagiotis Karvounis [EMAIL PROTECTED] wrote: It didn't work again! I have almost the same problem with all my JSP pages(Servlets work ok). I think is a Tomcat problem;The method handlePageException(Exception) in the type PageContext is not applicable for the arguments (Throwable) I went to servlet code produced and I changed catch(Throwable t) with catch(Exception t) and the java file was compiled succesfully with javac. Thanks for help Panagiotis On 7/27/05, Raghupathy,Gurumoorthy [EMAIL PROTECTED] wrote: %= request.getParameter(testParam) % may trow a null pointer so try %= request.getParameter(testParam) == null ? : request.getParameter(testParam) % Regards Guru -Original Message- From: Panagiotis Karvounis [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 13:23 To: tomcat-user@jakarta.apache.org Subject: Problem with Jasper-Need your help Hi.I am new with Tomcat and JSP and I need your help. I am trying the following simple jsp: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTML HEAD TITLEJSP Expressions/TITLE /HEAD BODY H2JSP Expressions/H2 UL LICurrent time: %= new java.util.Date() % LIYour hostname: %= request.getRemoteHost() % LIYour session ID: %= session.getId() % LIThe CODEtestParam/CODE form parameter: %= request.getParameter(testParam) % /UL /BODY /HTML And I get this error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: The method handlePageException(Exception) in the type PageContext is not applicable for the arguments (Throwable) org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3 28) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:382) org.apache.jasper.compiler.Compiler.compile(Compiler.java:280) org.apache.jasper.compiler.Compiler.compile(Compiler.java:259) org.apache.jasper.compiler.Compiler.compile(Compiler.java:247) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 44) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 96) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:302) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246) javax.servlet.http.HttpServlet.service(HttpServlet.java) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.1 logs. Can you help me? Thanks Panagiotis - 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: Linking/forwarding GET requests using Default servlet or other Tomcat feature
Yes, I know you can make many mappings to a given servlet/jsp, but that's not what I'm asking for. When an HTTP client requests /playoffs/gameScores.htm, I'm hoping there's some slight-of-hand trick/feature that will cause Tomcat to serve /teams/gameScores.htm WITHOUT a redirect so that it appears to the client that they're getting /playoffs/gameScores.htm.
Re: Linking/forwarding GET requests using Default servlet or other Tomcat feature
Sounds like something that can be done with frames or iframes Regards, Luis Rob Hunt wrote: Yes, I know you can make many mappings to a given servlet/jsp, but that's not what I'm asking for. When an HTTP client requests /playoffs/gameScores.htm, I'm hoping there's some slight-of-hand trick/feature that will cause Tomcat to serve /teams/gameScores.htm WITHOUT a redirect so that it appears to the client that they're getting /playoffs/gameScores.htm. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Linking/forwarding GET requests using Default servlet or other Tomcat feature
Look up the RequestDispatcher: http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/RequestDispatcher.html Server side forwards don't use a redirect On Wed, 2005-07-27 at 16:18, Luis Torres wrote: Sounds like something that can be done with frames or iframes Regards, Luis Rob Hunt wrote: Yes, I know you can make many mappings to a given servlet/jsp, but that's not what I'm asking for. When an HTTP client requests /playoffs/gameScores.htm, I'm hoping there's some slight-of-hand trick/feature that will cause Tomcat to serve /teams/gameScores.htm WITHOUT a redirect so that it appears to the client that they're getting /playoffs/gameScores.htm. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ben Souther F.W. Davison Co. CONFIDENTIALITY NOTICE: This e-mail message, and any accompanying documents, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, distribution or copying is prohibited. If you are not the intended recipient, please contact our office by email or by telephone at (508) 747-7261 and immediately destroy all copies of the original message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: confused
It's really quite simple - you first need a JDBC driver for Mysql - once you have that place it in the common/lib directory under tomcat. Restart tomcat and the driver will be loaded into memory. Once you have that - use Java code to connect to your db. That's it - you don't have to fool around with WEB-INF folders or web.xml or anything like that unless you plan on using beans and/or connection pooling classes. I know you have checked the web - but keep checking - there is a ton of info out there. HTH Adile -Original Message- From: ganesan malairaja [mailto:[EMAIL PROTECTED] Sent: July 26, 2005 7:40 PM To: tomcat-user@jakarta.apache.org Subject: confused guys i am seriously confused now.. a normal jsp i can display in tomcat.. ok i have some questions here :- 1) let say i have admin.jsp , i create a folder call MGT .. i put in side the file admin.jsp and create a WEB-INF folder and inside i put web.xml .. is it correct ? 2) do i have customise web.xml or can simply copy and paste the default WEB-INF folder into MGT. 3) i having problem displaying jsp files with Database access, do i haveto use the same mysql-javaconnecter or some other file ( need indepth guide ) ? i know the are alot of guides there .. but most of the skip the prerequisite .. what i really need to have in my linux system in order to setup the tomcat seerver which can display jsp with database access i am sorry if the questions are elementary.. but i have tried to solve on my own but no solution till now any help will be greatly appreciated ... thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.5/58 - Release Date: 7/25/05 -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.5/58 - Release Date: 7/25/05 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Compile error in v5 but not v4
Hello; An application I'm trying to support runs without error on Tomcat 4.1.24 on Windows and Tomcat 4.0.3 on HPUX. When attempting to have it run on Tomcat 5.0.28 on Windows one of the very large JSP pages fails to compile: Jul 27, 2005 3:02:46 PM org.apache.jasper.compiler.Compiler generateClass SEVERE: Javac exception Compile failed; see the compiler error output for details. jsp.java:9924: code too large for try statement } catch (Throwable t) { The code is large because of LOT of include statements. No doubt 9924 lines is excessive. But, is there a setting that will allow this to run in Tomcat 5 or am I faced with refactoring this application? Thanks, Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Jasper-Need your help
I found the solution; The method handlePage(Throwable) was introduced in JSP 2.0 The problem was that I had in my classpath a servlet.jar older where this method was not defined.I deleted it and everything works fine now. Thanks for support Panagiotis On 7/27/05, Panagiotis Karvounis [EMAIL PROTECTED] wrote: So is there anybody that can help me? Please guys...I don't know what to do. On 7/27/05, Panagiotis Karvounis [EMAIL PROTECTED] wrote: It didn't work again! I have almost the same problem with all my JSP pages(Servlets work ok). I think is a Tomcat problem;The method handlePageException(Exception) in the type PageContext is not applicable for the arguments (Throwable) I went to servlet code produced and I changed catch(Throwable t) with catch(Exception t) and the java file was compiled succesfully with javac. Thanks for help Panagiotis On 7/27/05, Raghupathy,Gurumoorthy [EMAIL PROTECTED] wrote: %= request.getParameter(testParam) % may trow a null pointer so try %= request.getParameter(testParam) == null ? : request.getParameter(testParam) % Regards Guru -Original Message- From: Panagiotis Karvounis [mailto:[EMAIL PROTECTED] Sent: 27 July 2005 13:23 To: tomcat-user@jakarta.apache.org Subject: Problem with Jasper-Need your help Hi.I am new with Tomcat and JSP and I need your help. I am trying the following simple jsp: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTML HEAD TITLEJSP Expressions/TITLE /HEAD BODY H2JSP Expressions/H2 UL LICurrent time: %= new java.util.Date() % LIYour hostname: %= request.getRemoteHost() % LIYour session ID: %= session.getId() % LIThe CODEtestParam/CODE form parameter: %= request.getParameter(testParam) % /UL /BODY /HTML And I get this error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: The method handlePageException(Exception) in the type PageContext is not applicable for the arguments (Throwable) org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle r.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3 28) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:382) org.apache.jasper.compiler.Compiler.compile(Compiler.java:280) org.apache.jasper.compiler.Compiler.compile(Compiler.java:259) org.apache.jasper.compiler.Compiler.compile(Compiler.java:247) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5 44) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2 96) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:302) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:246) javax.servlet.http.HttpServlet.service(HttpServlet.java) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.1 logs. Can you help me? Thanks Panagiotis - 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: ( URGENT Please ) tomcat connection refused
Did you generate the RSA key with the changeit password? Did you uncomment the section with 8443 port configuration? Did you wait long enough for the server to start (tail -f the catalina.out log and wait for it to see 8443 has started). What is in the catalina.out log? Any errors? On IBM AIX I had to change the protocol to IbmX503 and use SSL instead of TLS. Try changing TLS to SSL (see the section for configuring 8443 to do this). David -Original Message- From: Abdullah Abdullah [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 27, 2005 1:10 PM To: tomcat-user@jakarta.apache.org; tomcat-dev@jakarta.apache.org Subject: ( URGENT Please ) tomcat connection refused Dear all I am trying to create a secure connection between tomcat server and a browser. I have done exactly the same as the instructions on http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html but when I tried to connect on the port https://localhost:8443 , an alert popped up saying (( The connection was refused when attepting to contact localhost:8443 . So, I would be very grateful if anyone can let me know what is the problem ?? Thanks in advance Abdullah _ It's fast, it's easy and it's free. Get MSN Messenger 7.0 today! http://messenger.msn.co.uk - 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: Linking/forwarding GET requests using Default servlet or other Tomcat feature
Yes, I know that an internal forward would work. I just didn't want to code/test/debug it. Yes, I'm being very lazy here; but I hate to reinvent the feature if it already exists and it just seems to me that this is something that probably should already exist (since it can be done in Apache).
Re: Compile error in v5 but not v4
Tomcat5 uses jasper 2 which does much better optimizations of handlng custom tags. If you ahve a page with a lot of custom tags - it might not compile in tomcat 4. One alternative (but with a performance penalty) is to split some of the JSP file into a run-time include (jsp:include). -Tim Tom Willson wrote: Hello; An application I'm trying to support runs without error on Tomcat 4.1.24 on Windows and Tomcat 4.0.3 on HPUX. When attempting to have it run on Tomcat 5.0.28 on Windows one of the very large JSP pages fails to compile: Jul 27, 2005 3:02:46 PM org.apache.jasper.compiler.Compiler generateClass SEVERE: Javac exception Compile failed; see the compiler error output for details. jsp.java:9924: code too large for try statement } catch (Throwable t) { The code is large because of LOT of include statements. No doubt 9924 lines is excessive. But, is there a setting that will allow this to run in Tomcat 5 or am I faced with refactoring this application? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Linking/forwarding GET requests using Default servlet or other Tomcat feature
There is nothing in tomcat which out of the box can do this. But there are many 3rd party filters (or 3 liners which are easy to write) which can do this. -Tim Rob Hunt wrote: Yes, I know that an internal forward would work. I just didn't want to code/test/debug it. Yes, I'm being very lazy here; but I hate to reinvent the feature if it already exists and it just seems to me that this is something that probably should already exist (since it can be done in Apache). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat threads - waiting on monitor entry
Hi, We have an web application running under Tomcat (5.0.28) on Red Hat Linux and uses Postgres database (8.0). For database connection pooling we use commons-dbcp (1.2.1) and commons-pool(1.2.1) After some time of high-usage, the web application stops responding. Dumping of the thread stack traces shows several http threads locked in a particular DBCP call: http-8443-Processor10 daemon prio=1 tid=0xa949bb60 nid=0x884 waiting for monitor entry [a765c000..a765e878] at java.sql.DriverManager.getConnection(DriverManager.java:187) - waiting to lock 0xaf5bcf10 (a java.lang.Class) at com.coreservice.db.PooledDBConnection.getConnection(PooledDBConnection.j ava:159) Has anyone else seen these locks? Are we missing something about DBCP/pool configuration and usage under Tomcat? Any suggestions? JP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
accessing global Environment values?
Hello, I have a stock Tomcat 5.5.9 with JDK 1.5. This is a fresh install, nothing has changed. I am not able to lookup the default simpleValue environment variable form JNDI with a simple JSP file. Is there anything else I have to do to move an Environment variable, from GlobalNamingResources, into the scope of a webapp? I placed a JSP file into the webapps/ROOT directory, just for testing (contents below). The last line throws the NamingException because it's not found. When I remove the last line, I'm able to browse the JNDI tree, and I get the following output: From java: : comp: org.apache.naming.NamingContext From java:comp/ : UserTransaction: org.apache.naming.TransactionRef From java:comp/ : env: org.apache.naming.NamingContext From java:comp/ : Resources: org.apache.naming.resources.ProxyDirContext Any advice on how to expose GlobalNamingResources's Environment variables into webapps? Thanks very much, Seth Test JSP File, in webapps/ROOT : % javax.naming.Context ctx = new javax.naming.InitialContext(); javax.naming.NamingEnumeration e = ctx.list(java:); while (e.hasMoreElements()) { out.println(From java: : + e.nextElement() + br); } e = ctx.list(java:comp/); while (e.hasMoreElements()) { out.println(From java:comp/ : + e.nextElement() + br); } e = ctx.list(java:comp/env/); while (e.hasMoreElements()) { out.println(From java:comp/env/ : + e.nextElement() + br); } System.out.println(new javax.naming.InitialContext().lookup(java:comp/env/simpleValue)); % - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Viewing Web Resource Updates without Restarting Tomcat
Currently, I wish to make minor changes to web pages, and the like, associated with a production application without restarting Tomcat, and with minimal impact to users. These changes can be made, but are not immediately observable due to caching. Is there any command that can be issued to Tomcat so that changes can be immediately observed (e.g. a cache flush)? Thankyou _ Sell your car for $9 on carpoint.com.au http://www.carpoint.com.au/sellyourcar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: confused thx
thanks guys i have managed to solve the problem .. the solution was staring at my face all the time i just the mysql-j-connector.jar file into the common/lib folder :) thanks for ur help htmlDIV DIVFONT color=#cc face=Lucida Handwriting, CursiveEMSTRONGIMG height=16 src=http://graphics.hotmail.com/emarrow_right.gif; width=16Ganesan_MalairajaIMG height=16 src=http://graphics.hotmail.com/emarrow_left.gif; width=16/STRONG/EM/FONT/DIV/DIV/html From: [EMAIL PROTECTED] Reply-To: Tomcat Users List tomcat-user@jakarta.apache.org To: Tomcat Users List tomcat-user@jakarta.apache.org Subject: Re: confused Date: Wed, 27 Jul 2005 10:40:51 + Try the jspbook - http://www.jspbook.com . You can download the entire book after you register. It's written for tomcat 5 using jdk 1.4 but seems to translate well for tomcat4 (for the most part). This will help. al guys i am seriously confused now.. a normal jsp i can display in tomcat.. ok i have some questions here :- 1) let say i have admin.jsp , i create a folder call MGT .. i put in side the file admin.jsp and create a WEB-INF folder and inside i put web.xml .. is it correct ? 2) do i have customise web.xml or can simply copy and paste the default WEB-INF folder into MGT. 3) i having problem displaying jsp files with Database access, do i haveto use the same mysql-javaconnecter or some other file ( need indepth guide ) ? i know the are alot of guides there .. but most of the skip the prerequisite .. what i really need to have in my linux system in order to setup the tomcat seerver which can display jsp with database access i am sorry if the questions are elementary.. but i have tried to solve on my own but no solution till now any help will be greatly appreciated ... thanks - 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: mod_jk not detecting loss of a load balanced machine
Hi, Is this issue described below familiar to anyone who is really knowledgable of how mod_jk works? Thank you, Edmon Edmon Begoli wrote: We've noticed with two versions of mod_jk we've been using (1.2.5 and one older) that if one of the machines hosting load balanced tomcat gets completely off the network (power loss) mod_jk will seem not to emove that one from the load balanced instances, so the whole site will appear down because mod_jk will I guess try to hit it. I can not say for sure that it is the reason behind the scenes, but I can say for sure that these versions of mod_jk do not respond well to machine losses - which is a pretty possible scenario. My question is - has this been addressed in some of the later releases, and if not is there a workaround? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TC Apache integration
Hi All, I am following the resource - http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html to try and achieve the above. I have a few questions as I seem to only be getting so far following the instructions. I have acquired the mod_jk-1.2.8-apache-2.0.52.so binary from the Jakarta website. What do I do with it? I have added the connector to TOMCAT_HOME/conf.server.xml - Connector className=org.apache.tomcat.service.PoolTcpConnector Parameter name=handler value=org.apache.tomcat.service.connector.Ajp12ConnectionHandler/ Parameter name=port value=8007/ /Connector (but can not see the port being consumed (netstat)) I have added the line Include C:\dev\tomcat5\jakarta-tomcat-5.5.9\conf\jk\mod_jk.conf-auto to my httpd.conf file. The page I mention says To configure Tomcat to generate the Apache auto-configuration add the following block to your TOMCAT_HOME/conf/server.xml file after AutoWebApp ... /. ApacheConfig /. I can see no such AutoWebApp ... / tag in my server.xml. Where / should it be added? Finally, Apache is running on HTTP port 80, any restrictions on Tomcat HTTP port (not 80)? Many thanks for your assistance Paul.
RE: TC Apache integration
From: Paul Wallace [mailto:[EMAIL PROTECTED] Subject: TC Apache integration I am following the resource - http://jakarta.apache.org/tomcat/tomcat-3.2-doc/mod_jk-howto.html to try and achieve the above. I have added the line Include C:\dev\tomcat5\jakarta-tomcat-5.5.9\conf\jk\mod_jk.conf-auto to my httpd.conf file. I can't answer your questions, since, in general, Tomcat 5.5.9 has outgrown the need to be front-ended by httpd, so I don't use it. However, I do have a question for you: why would you think the 3.2 Tomcat doc has any relevance to the 5.5.9 release? Have you tried perusing the 5.5 doc? - 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]