Recompiling jsp; Problems with Access Denied errors after I edit a file in a webapp; Admin app
I've been away from Tomcat for a while, and just tried setting up 5.5.9 on WinXP, with JDK1.5.0_2. It's working reasonably well, but I'm having some issues. First of all, what is the admin app? It's obviously different from manager, but I can't find any information about it. When I try to execute it, it says I must download and install the admin package. I found a reference in tomcat-user to the Admin tool which shows how you install it once you get the installer, but nothing about where to get the installer, or even what the admin app does. After I installed Tomcat, I deployed an app through the Manager app, from a directory and context, not uploading a WAR. It confused me later when I tried changing one of the JSP files in the directory, and it wouldn't get recompiled. I later realized that deploying from a directory actually copies the tree from that directory into the webapps directory inside the Tomcat distribution. Is it feasible to have the actual webapp location be outside of the Tomcat distribution? This is more realistic in a development situation. The most bizarre thing is that I've twice tried to edit files in the Tomcat distribution, being the conf/web.xml and then later the JSP file for my application stored in the webapp directory, and that seems to cause Tomcat to fail with Access denied errors on the files that I edited. After I change the file, I've made sure my reference to the file was closed, from the editor I was using. I even tried restarting the box, and surprisingly, that had no effect. It still got Access Denied errors. The only thing I could do was undeploy the app (in the case of the the JSP file) and redeploy it, or in the case of the conf/web.xml, I had to completely uninstall Tomcat and reinstall it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FORM-based ldap authentication problem
I haven't tried to set up an LDAP authenticator in Tomcat, but shouldn't you have to specify the attribute name for the uid? You've specified the pattern for the search DN, but I would assume you'd have to specify uid separately somewhere. -Original Message- From: Maurice Coyle - Sun Microsystems Ireland [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 10:07 AM To: [EMAIL PROTECTED] Subject: RE: FORM-based ldap authentication problem by all means. there's 4 basic steps to this: 1. in server.xml paste the following (replace YOUR-SERVER with the url of the ldap server and you'll probably have to change the userBase bit too) to tell tomcat where to go to authenticate: Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionURL=ldap://YOUR-SERVER:389 userBase=ou=people,dc=sun,dc=com userSearch=uid={0}/ 2. in web.xml, right at the end paste the following (add url-pattern tags for whicever other types of files you want protected): security-constraint web-resource-collection web-resource-nametracker/web-resource-name url-pattern*.jsp/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint !-- role-namestd/role-name -- role-name*/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method realm-nameldapRealm/realm-name form-login-config form-login-page/login.jsp/form-login-page form-error-page/login_error.jsp/form-error-page /form-login-config /login-config 3. create login.jsp and login_error.jsp and put them in the web-app's document root login.jsp must include the form with the j_* fields as in the skeleton form below: form action=j_security_check method=POST LDAP AuthenticationBR strongEnter UserId/strongbr input type=text name=j_username size=22 strongEnter Password/strongbr input type=password name=j_password size=22 input type=submit name=Submit value=Submit /form login_error.jsp can be as simple as: html body The system was not able to log you in.br form input type=button onclick=history.go(-1) value=Retry/ /form /body /html 4. when you've successfully logged in, to get the name of the user who's logged in, use String user = request.getRemoteUser(); hope this helps, maurice Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Subscribe: mailto:[EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Post: mailto:[EMAIL PROTECTED] List-Id: Tomcat Users List tomcat-user.jakarta.apache.org Delivered-To: mailing list [EMAIL PROTECTED] X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message Subject: RE: FORM-based ldap authentication problem Date: Tue, 1 Jul 2003 12:52:46 -0400 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: FORM-based ldap authentication problem Thread-Index: AcM/8O7x+q8RZHTaQ5mM0xzRg5mCtAAACyJA From: Pitre, Russell [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED], Maurice Coyle - Sun Microsystems Ireland [EMAIL PROTECTED] X-OriginalArrivalTime: 01 Jul 2003 16:52:46.0869 (UTC) FILETIME=[32D05C50:01C33FF1] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by dub-mail1.Ireland.Sun.COM id h61GrEh10906 I've been trying to get form-based ldap authentication workingbut no luck.do you think i could see some sample code? Russ -Original Message- From: Maurice Coyle - Sun Microsystems Ireland [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 12:50 PM To: [EMAIL PROTECTED] Subject: FORM-based ldap authentication problem hi all, i've implemented form-based ldap authentication on my tomcat server. it works fine in general but from time to time when i enter my ldap username and password, i get a blank page with j_security_check in the location field. if i reload the page, i get the login_error.jsp page and upon reloading the page one further time, i am logged in successfully. this is the exact sequence whenever there is a problem with the authentication, i can reload the page 3 times and i get accepted. does anyone have a clue what's the cause and if there's a solution? appreciate any help, maurice - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
RE: FORM-based ldap authentication problem
No, I don't mean the request parameter name in the form, I mean the LDAP attribute name. Nevertheless, after looking over the Tomcat documentation, this probably isn't your issue. You should read over this documentation carefully and make sure you've specified everything you need to connect to your particular LDAP server. In particular, I think it's likely that you'll need to specify the connectionName, connectionPassword, and userPassword attributes. This is just a guess, as there's several ways to configure an LDAP server. -Original Message- From: Maurice Coyle - Sun Microsystems Ireland [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 10:29 AM To: [EMAIL PROTECTED] Subject: RE: FORM-based ldap authentication problem i'm pretty sure the j_username is the logical attribute name for the uid. the container manages the internals of the authentication. is this what you meant? i wouldn't consider myself any sort of authority on the j_* attributes, i just tried them and they worked. i suspect that this is the root of my problem, so if nayone knows of a decent source of info about them i'd appreciate it. I haven't tried to set up an LDAP authenticator in Tomcat, but shouldn't you have to specify the attribute name for the uid? You've specified the pattern for the search DN, but I would assume you'd have to specify uid separately somewhere. -Original Message- From: Maurice Coyle - Sun Microsystems Ireland [mailto:[EMAIL PROTECTED] by all means. there's 4 basic steps to this: 1. in server.xml paste the following (replace YOUR-SERVER with the url of the ldap server and you'll probably have to change the userBase bit too) to tell tomcat where to go to authenticate: Realm className=org.apache.catalina.realm.JNDIRealm debug=99 connectionURL=ldap://YOUR-SERVER:389 userBase=ou=people,dc=sun,dc=com userSearch=uid={0}/ 2. in web.xml, right at the end paste the following (add url-pattern tags for whicever other types of files you want protected): security-constraint web-resource-collection web-resource-nametracker/web-resource-name url-pattern*.jsp/url-pattern http-methodGET/http-method http-methodPOST/http-method /web-resource-collection auth-constraint !-- role-namestd/role-name -- role-name*/role-name /auth-constraint /security-constraint login-config auth-methodFORM/auth-method realm-nameldapRealm/realm-name form-login-config form-login-page/login.jsp/form-login-page form-error-page/login_error.jsp/form-error-page /form-login-config /login-config 3. create login.jsp and login_error.jsp and put them in the web-app's document root login.jsp must include the form with the j_* fields as in the skeleton form below: form action=j_security_check method=POST LDAP AuthenticationBR strongEnter UserId/strongbr input type=text name=j_username size=22 strongEnter Password/strongbr input type=password name=j_password size=22 input type=submit name=Submit value=Submit /form login_error.jsp can be as simple as: html body The system was not able to log you in.br form input type=button onclick=history.go(-1) value=Retry/ /form /body /html 4. when you've successfully logged in, to get the name of the user who's logged in, use String user = request.getRemoteUser(); hope this helps, maurice Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Subscribe: mailto:[EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Post: mailto:[EMAIL PROTECTED] List-Id: Tomcat Users List tomcat-user.jakarta.apache.org Delivered-To: mailing list [EMAIL PROTECTED] X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 content-class: urn:content-classes:message Subject: RE: FORM-based ldap authentication problem Date: Tue, 1 Jul 2003 12:52:46 -0400 X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: FORM-based ldap authentication problem Thread-Index: AcM/8O7x+q8RZHTaQ5mM0xzRg5mCtAAACyJA From: Pitre, Russell [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED], Maurice Coyle - Sun Microsystems Ireland [EMAIL PROTECTED] X-OriginalArrivalTime: 01 Jul 2003 16:52:46.0869 (UTC) FILETIME=[32D05C50:01C33FF1] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by dub-mail1.Ireland.Sun.COM id h61GrEh10906 I've been trying to get form-based ldap authentication workingbut no
RE: JSTL and EL question - SOLVED
This behavior is described in the JSP 1.2 specification, in section JSP.7.3 (not in one single place in the section). -Original Message- From: Schwartz, David (CHR) [mailto:[EMAIL PROTECTED] Hi David. This method works great. Thanks Is there any downside to using it? Is it still considered standard? -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] The setup can be a little simpler than this. The taglib jar can contain the TLD for the taglib in the META-INF directory of the jar. If it is present there, you do not have to deploy the TLD separately. In addition, if the TLD is present there, you do not have to have the explicit taglib map in your web.xml file. In this case, your taglib directive in the JSP page needs to specify the URI that is specified in the TLD in the taglib jar file, which is hopefully documented in the taglib documentation (so you don't have to open the file in the jar file). If this is done correctly, you can skip steps 2 and 3 of this process. -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] I thought I liked the idea of having the taglib in the web.xml file. When I try it I'm getting This absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application. Do I have to download it somewhere in order to use it in the web.xml file? Any ideas? :-) OK, four things when dealing with ANY tag library: 1. PLACE JAR FILES Place JAR files that hold implementation of the tag library in a directory where Tomcat will pick it up. Either make it WEB-INF/lib/ (private) or ${CATALINA_HOME}/shared/lib (all web-apps will have access to it). You could place it in ${CATALINA_HOME}/common/lib, but I don't see the point in Tomcat having access to those JARs. There was a discussion recently naming pros/cons of each choice (Craig), so look up the archives. 2. PLACE TLD Place TLD files (Tag Library Descriptor) in either WEB-INF/ or (if I recall correctly) WEB-INF/taglibs/. The first placement will require for location in web.xml file to be absolute: /WEB-INF/name.tld, while the second will allow for relative links: name.tld 3. DECLARE TLD IN WEB.XML This part you've already seen. taglib taglib-urihttp://java.sun.com/jstl/core/taglib-uri taglib-location/WEB-INF/c.tld/taglib-location /taglib - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL and EL question - SOLVED
The setup can be a little simpler than this. The taglib jar can contain the TLD for the taglib in the META-INF directory of the jar. If it is present there, you do not have to deploy the TLD separately. In addition, if the TLD is present there, you do not have to have the explicit taglib map in your web.xml file. In this case, your taglib directive in the JSP page needs to specify the URI that is specified in the TLD in the taglib jar file, which is hopefully documented in the taglib documentation (so you don't have to open the file in the jar file). If this is done correctly, you can skip steps 2 and 3 of this process. -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 10:21 PM To: Tomcat Users List Subject: Re: JSTL and EL question - SOLVED I thought I liked the idea of having the taglib in the web.xml file. When I try it I'm getting This absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application. Do I have to download it somewhere in order to use it in the web.xml file? Any ideas? :-) OK, four things when dealing with ANY tag library: 1. PLACE JAR FILES Place JAR files that hold implementation of the tag library in a directory where Tomcat will pick it up. Either make it WEB-INF/lib/ (private) or ${CATALINA_HOME}/shared/lib (all web-apps will have access to it). You could place it in ${CATALINA_HOME}/common/lib, but I don't see the point in Tomcat having access to those JARs. There was a discussion recently naming pros/cons of each choice (Craig), so look up the archives. 2. PLACE TLD Place TLD files (Tag Library Descriptor) in either WEB-INF/ or (if I recall correctly) WEB-INF/taglibs/. The first placement will require for location in web.xml file to be absolute: /WEB-INF/name.tld, while the second will allow for relative links: name.tld 3. DECLARE TLD IN WEB.XML This part you've already seen. taglib taglib-urihttp://java.sun.com/jstl/core/taglib-uri taglib-location/WEB-INF/c.tld/taglib-location /taglib 4. DECLARE TLD USAGE IN JSP This you've seen %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % The prefix is up to you. Nix. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSTL and EL question - SOLVED
The jar file is not encrypted, it's just a zip file. Look in the META-INF directory for a .tld file. This file will also tell you what URI you need to use in the uri attribute of the taglib directive in your JSP page. -Original Message- From: Schwartz, David (CHR) [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 8:37 AM To: 'Tomcat Users List' Subject: RE: JSTL and EL question - SOLVED Thats a great idea much easier to implement. How can I determine if the jar file has the tld? More specifically, I'm using the jakarta dbtags. do they package it that way? -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 11:21 AM To: Tomcat Users List Subject: RE: JSTL and EL question - SOLVED The setup can be a little simpler than this. The taglib jar can contain the TLD for the taglib in the META-INF directory of the jar. If it is present there, you do not have to deploy the TLD separately. In addition, if the TLD is present there, you do not have to have the explicit taglib map in your web.xml file. In this case, your taglib directive in the JSP page needs to specify the URI that is specified in the TLD in the taglib jar file, which is hopefully documented in the taglib documentation (so you don't have to open the file in the jar file). If this is done correctly, you can skip steps 2 and 3 of this process. -Original Message- From: Nikola Milutinovic [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2003 10:21 PM To: Tomcat Users List Subject: Re: JSTL and EL question - SOLVED I thought I liked the idea of having the taglib in the web.xml file. When I try it I'm getting This absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application. Do I have to download it somewhere in order to use it in the web.xml file? Any ideas? :-) OK, four things when dealing with ANY tag library: 1. PLACE JAR FILES Place JAR files that hold implementation of the tag library in a directory where Tomcat will pick it up. Either make it WEB-INF/lib/ (private) or ${CATALINA_HOME}/shared/lib (all web-apps will have access to it). You could place it in ${CATALINA_HOME}/common/lib, but I don't see the point in Tomcat having access to those JARs. There was a discussion recently naming pros/cons of each choice (Craig), so look up the archives. 2. PLACE TLD Place TLD files (Tag Library Descriptor) in either WEB-INF/ or (if I recall correctly) WEB-INF/taglibs/. The first placement will require for location in web.xml file to be absolute: /WEB-INF/name.tld, while the second will allow for relative links: name.tld 3. DECLARE TLD IN WEB.XML This part you've already seen. taglib taglib-urihttp://java.sun.com/jstl/core/taglib-uri taglib-location/WEB-INF/c.tld/taglib-location /taglib 4. DECLARE TLD USAGE IN JSP This you've seen %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % The prefix is up to you. Nix. - 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]
Proper way to deal with serialization of session attribute with Loggerattribute
I'm using JDK 1.4.1, and Tomcat 4.1.24. I was seeing a strange situation where some cactus/ant tests of mine would succeed on one run, and then fail on the next, and alternate in that pattern continuously. After looking carefully at the Tomcat logs, I discovered that a class that is instantiated and then put into the session has a Log4J Logger object. Tomcat tries to persist that session, but it fails because Logger is not serializable. If I want to allow objects of this class to be serialized and deserialized, how do I deal with the contained Logger object? The class presently defines it's logger instance variable like this: protected final Logger logger = Logger.getLogger(this.getClass()); Do I instead have to make this transient and change all the references to the logger instance variable to call an accessor which tries to initialize the value first if it's null? Or perhaps do I have to add writeObject() and readObject() methods where the writeObject() method specifically writes all the fields but this one, and the readObject() method reads all those fields, and then manually sets the logger value? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Proper way to deal with serialization of session attribute withLogger attribute
-Original Message- From: Karr, David I'm using JDK 1.4.1, and Tomcat 4.1.24. I was seeing a strange situation where some cactus/ant tests of mine would succeed on one run, and then fail on the next, and alternate in that pattern continuously. After looking carefully at the Tomcat logs, I discovered that a class that is instantiated and then put into the session has a Log4J Logger object. Tomcat tries to persist that session, but it fails because Logger is not serializable. If I want to allow objects of this class to be serialized and deserialized, how do I deal with the contained Logger object? Ok, making the Logger variable static is an easy fix for this. However, I'm now seeing another problem related to the serialization and deserialization of this class. I see that (I didn't write this code) this class has a static initializer that calls an accessor to read something that is created in the init() method of the servlet related to this class. Normally, the servlet's init() method is executed (load-on-startup), and then later this class is loaded, making those references safe. However, when Tomcat loads serialized sessions, it loads these classes before loading servlets. This causes my reloaded session to fail. It seems pretty clear to me that the logic needs to be changed so that the accessor (on a null check) should call the same method that the servlet's init() method calls, to deal with the case that this accessor is called before the servlet is inited. However, I would ask, is it expected that Tomcat will load serialized sessions before loading the load-on-startup servlets? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSPC for TOMCAT 4.124 generates unexpected internal error
Normal behavior. You need to change web-inf to WEB-INF. -Original Message- From: Dufresne, Marc [mailto:[EMAIL PROTECTED] I'm doing a simple test to compile the checkbox JSP from the TOMCAT examples with the -webinc switch The JAVA and XML files are properly generates but jasper complains (unexpectedly ) that the web.xml file is no found here is the output fragment: 2003-04-04 04:21:34 - uriRoot implicitly set to /dsa1/apache/jakarta/tomcat/web apps/examples 2003-04-04 04:21:34 - Internal Error: File /WEB-INF/web.xml not found Check the web.xml file is really there: bash$ pwd /dsa1/apache/jakarta/tomcat/webapps/examples/web-inf bash$ ls classes jsp web.xml bash$ OK, spurious or normal behaviour ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JSPC for TOMCAT 4.124 generates unexpected internal error
Ok, well, one technique you might use to diagnose what's happening here is to use some tool for monitoring I/O operations, like truss on Solaris, or FileMon on Windows. You can search for references to that file name, and it will tell you what directories it is looking in. Hopefully that will give you a clue to why it's not finding it in the directory you expect. -Original Message- From: Dufresne, Marc [mailto:[EMAIL PROTECTED] the lower case is an artefact of GNV (BASH shell for OpenVMS) The actuall directory name *IS* in caps when watching JSPC do it's file search up the tree, it does in fact find the directory porperly. next? -Original Message- From: Karr, David [mailto:[EMAIL PROTECTED] Normal behavior. You need to change web-inf to WEB-INF. -Original Message- From: Dufresne, Marc [mailto:[EMAIL PROTECTED] I'm doing a simple test to compile the checkbox JSP from the TOMCAT examples with the -webinc switch The JAVA and XML files are properly generates but jasper complains (unexpectedly ) that the web.xml file is no found here is the output fragment: 2003-04-04 04:21:34 - uriRoot implicitly set to /dsa1/apache/jakarta/tomcat/web apps/examples 2003-04-04 04:21:34 - Internal Error: File /WEB-INF/web.xml not found Check the web.xml file is really there: bash$ pwd /dsa1/apache/jakarta/tomcat/webapps/examples/web-inf bash$ ls classes jsp web.xml bash$ OK, spurious or normal behaviour ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Remote debugging throught network
Any JPDA-compliant debugger can do this. NetBeans is one example. You simply specify the Attach to remote server option (different debuggers will name this differently), and specify the host where your JVM is running on, dt_socket connections, and the address. You'll probably want to have your application source code and/or Tomcat's source code mounted in the project (so you'll have something to set breakpoints on). -Original Message- From: Edson Alves Pereira [mailto:[EMAIL PROTECTED] Sent: Friday, March 07, 2003 5:55 AM To: 'Tomcat-User List' Subject: Remote debugging throught network Hello folks, i´m trying to debug my application in a special machine throught network, that machine is a Linux with Tomcat-4.1.18 as it´s server. I´m already have a development environment in my personal machine, but there are some error with my application that happen only in Linux. My Linux´s Tomcat is running with remote debugging using this parameters: JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n The problems is, i don´t known how to reach this VM from my own machine, how i could do that? With best wishes, Edson Alves Pereira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: I'm new to this and could use a hand
Or simply: %= new java.util.Date().toString() % -Original Message- From: Fines, Steven [mailto:[EMAIL PROTECTED] If the body of your JSP is solely %= java.util.Date % you haven't given it anything to display. You will need to do something like this: html body % java.util.Date today = new java.util.Date(); % %= today.toString() % /body /html SF -Original Message- From: Barry Jones [mailto:[EMAIL PROTECTED] I just downloaded and installed the most recent release of Tomcat and I'm running it on Windows XP. I'm trying to learn JSP on my local machine (8080), but I have a few questions. When attempting a helloworld.jsp page that was to include the date, the code %= java.util.Date() % is not displaying anything at all. I'm trying to figure out what could be setup incorrectly to keep this from running. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Am i doing something wrong while using jsp:setProperty ... / ?????
How about changing the double quotes on the value attribute value to single quotes? -Original Message- From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] I downcasted but it did not help. jsp:useBean id=faqHelper class=FAQHelper scope=session jsp:setProperty name=faqHelper property=dbReader value=%= (Object)session.getAttribute(DBREADER)% / jsp:setProperty name=faqHelper property=dbWriter value=%= (Object)session.getAttribute(DBWRITER)% / /jsp:useBean - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Compile JSP on Tomcat Startup
The JSPC tool does exactly that, it generates .java files. You have to compile them in your build step. You also need to make sure that your JSPC tool generates a web.xml excerpt that can be semi-automatically or automatically (by JSPC) merged into your main web.xml file. The web.xml excerpt contains the servlet mappings for the generated servlets. If you don't include this, your JSP pages will still be recompiled again when they are used at runtime. The best test to make sure you've done everything right in precompiling JSPs is to not include the JSP pages in the WAR file. -Original Message- From: Molof, Barry [mailto:[EMAIL PROTECTED] Sent: Friday, February 28, 2003 10:07 AM To: Tomcat Users List Subject: RE: Compile JSP on Tomcat Startup Importance: High Can someone PLEASE help me? This is an urgent issue. Thanks -Original Message- From: Molof, Barry Sent: Friday, February 28, 2003 10:02 AM To: Tomcat Users List Subject: RE: Compile JSP on Tomcat Startup I tried jspc and all it did was convert .jsp to .java, instead of .class. I'm looking for a solution that handles the conversion of .jsp to .java to .class files during Tomcat 3.3.1a startup. Can anyone else help? Thanks -Original Message- From: Mr. Cristian Romanescu [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 26, 2003 3:07 AM To: Tomcat Users List Subject: Re: Compile JSP on Tomcat Startup I think that you would use jspc (JSP compiler) that comes with Tomcat distribution. It's materialized in jsp.bat[sh] in $TOMCAT_HOME/bin directory. I hope I'm correct, but I cannot give you more info regards, c. At 04:07 PM 2/25/2003 -0500, you wrote: How can I compile all of my JSPs when I start Tomcat? The version I am using is 3.3.1a. Any help would be great. Thanks. Barry - 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: is there a tag or some kind of mechanism that would do the following ...
I'd say your best strategy is to approach this problem from a different direction. Instead of figuring out how to make it easy to emit HTML from your servlet, work on building JSP custom tags which emit small logical pieces, and then reference those tags from your JSP pages. -Original Message- From: Mufaddal Khumri [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 1:19 AM To: Tomcat Users List Subject: Re: is there a tag or some kind of mechanism that would do the following ... I could use a giant String being returned from some static method .. but the problem is that i would have to do the following: static String getString() { String str = html +title +ding dong bells +/title +body/body/html; return str; } In the above code i will have to type in the quotes and + signs everywhere since if the string gets too long it will all be on one line and the html code from a developer stand point would not be maintainable. Are there any other better ideas to do this ? Mufaddal. On Tuesday, February 25, 2003, at 01:57 PM, Mufaddal Khumri wrote: Hi, Many times we come across a lot of out.println( ... ) statements in our servlets: public class MyServlet extends { doPost( ... ) { . . out.println(html); out.println(title); out.println(ding dong bells); out.println(/title); out.println(body); out.println(/body); out.println(/html); .. } } I do know that if your code has more html .. its better to write a .jsp file instead of a servlet.java file There are some cases where this is unavoidable and I was wondering if there was a way to do something like below in a .java file: public class MyServlet extends { doPost( ... ) { . . Some kind of tag that signals to the compiler that whatever follows is to be out.println(... ) html title ding dong bells /title body /body /html /end of the signalling tag .. } } - 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]
JPDA_ADDRESS default in catalina.sh is 8000, but jdbconn in catalina.bat
It seems perfectly reasonable to me to default JPDA_ADDRESS to 8000, as is set in catalina.sh. However, I noticed that in catalina.bat, the default is not 8000, and isn't even a number, being jdbconn, whatever that means. What is the reason for that difference? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]