Re: including header, footer in jsp

2003-02-24 Thread jeff . guttadauro
The Struts template taglib handles this very nicely and is pretty straightforward, although the Struts team is now recommending using a more complex version of this called Tiles. Check it out. runu rathi <[EMAIL PROTECTED]> 02/22/03 12:25 PM Please respond to "Tomcat Users List"

wrestling with JSP error page

2003-02-21 Thread jeff . guttadauro
Hi, all. I'm finding that the JSP errorPage directive has a serious flaw. Perhaps others out there have run into this and been as frustrated as I am and hopefully come up with some solution...? The flaw is that, if the response has already been committed, then the error page is just pl

Re: UTF-8 Sending Euro symbol to Servlet in Form data.

2003-02-17 Thread jeff . guttadauro
Hi, Andoni. I'm not 100% sure how this all works, but I think there's a default system encoding on the system where your Tomcat is running. This encoding determines how the form request parameters come across. I think when I ran into a similar problem a while back I got around it by d

RE: jsp:useBean error

2003-01-31 Thread jeff . guttadauro
well khalid, u haven't seen fit to respond to me yet, so consider this to be yer "light a fire under you" email!!! [snip] Please try to respond to me with some useful advice about how I can successfully execute this JSP, because it doesn't look too much like anyone else in this newsgroup much f

RE: servlet with Tomcat

2003-01-14 Thread jeff . guttadauro
These are extremely clear and detailed instructions - nice, Denise... Hopefully, this will help Steve emerge victorious from his year-long battle against Tomcat. One thing though I wanted to point out is that the values should match, so use the same thing ("greeting", "Startup", or whatever)

Re: Installation woes

2003-01-08 Thread jeff . guttadauro
Open a terminal window yourself first, then run %CATALINA_HOME%/bin/startup.bat. Now you should be able to see the error message without the window disappearing on you. Also, make sure the JAVA_HOME points to the top level directory of your JDK ("C:\jdk1.3" instead of "C:\jdk1.3\bin" for inst

Re: Session timeout setting (URGENT)

2002-12-20 Thread jeff . guttadauro
Hi, Kenny. I think this is basically how it works: - Tomcat's conf web.xml sets the default session-timeout (in session-config element) to use for all web apps. - You can specify a different session-timeout in each specific web app you deploy in the web app's WEB-INF/web.xml file. - T

Re: Session timeout setting

2002-12-19 Thread jeff . guttadauro
My guess is that the application is probably overriding the setting in your web.xml by using the setMaxInactiveInterval method on the session object. "Kenny G. Dubuisson, Jr." <[EMAIL PROTECTED]> 12/19/02 09:07 AM Please respond to "Tomcat Users List" To: "Tomcat Users List" <

Re: UTF-8 vs ISO-8859-1 and really screwed up webpages.

2002-12-19 Thread jeff . guttadauro
I think they're supposed to be, but I have found that the META tags sometimes don't seem to work, whereas the JSP directive seems to be more reliable. "Andoni" <[EMAIL PROTECTED]> 12/19/02 08:37 AM Please respond to "Tomcat Users List" To: "Tomcat Users List" <[EMAIL PROTECTED

Re: Tomcat 4 StandAlone Web Server, Static HTML and Images

2002-11-18 Thread jeff . guttadauro
Looks like you're basically putting your images in its own web app. You may need a WEB-INF directory and trivial web.xml file under the images directory in order for Tomcat to like it as a web app (not sure though). Then, I think your url for the image would be "/images/image.gif". Alternative

Tomcat 4.1.12 - Incompatible type for getting or setting field

2002-11-14 Thread jeff . guttadauro
Hi, all. I saw a message someone posted to the list asking about this a few days ago and have been eagerly waiting to see the responses (haven't been any though), since I ran into the same problem when upgrading to Tomcat 4.1.12. To reiterate the problem, version 4.1.12 often gives thi

Re: java.lang.NullPointerException

2002-10-23 Thread jeff . guttadauro
Just take a look at line 124 of the generated servlet (FamilyMain$jsp.java) mentioned in the stack trace. This file will be under the work directory. Look for code calling a method on an object, which in this error condition happens to be null. HTH, -Jeff

RE: Where is the Exception object when is used?

2002-10-18 Thread jeff . guttadauro
request.getAttribute("javax.servlet.error.exception") is where you can find the exception object thrown FYI - javax.servlet.error.request_uri tells you what the original request was HTH, -Jeff

RE: global.jsa -> Struts

2002-09-04 Thread jeff . guttadauro
If you're looking for a very basic MVC implementation, you can use a small part of what Struts offers and be able to save the time you would spend writing your own. You do pretty much exactly what you wrote in your second paragraph. Set up your struts-config.xml file to define your actions and

RE: javax directory

2002-08-26 Thread jeff . guttadauro
The classpath used when you do your Java compiling. Tomcat is not involved at all at this stage in the game. "Reis, Tom"

Re: STILL Need Help w. Tomcat Install

2002-08-22 Thread jeff . guttadauro
Oh, come on, the "this is Steve Burris" bit makes me giggle every time... ;) Jacob Kjome

Re: Re[4]: Quick Question

2002-08-13 Thread jeff . guttadauro
Hi, Alex. Since JSP's are turned into servlets before they are executed, I don't see why you couldn't do this. For your convenience, JSP's have some common objects already available for use. The "application" object is equivalent to the javax.servlet.ServletContext object you would get by

Re: howto avoid overuse of session object?

2002-08-01 Thread jeff . guttadauro
Thanks, Cédric and Peter Lin, for your responses. Both of you seem to be saying that, instead of storing large objects in the session object, I should be storing them in the application object (ServletContext). I find this to be rather confusing. It seems like the overhead involved in storing

OT: howto avoid overuse of session object?

2002-08-01 Thread jeff . guttadauro
This is sort of off-topic, but I don't know of a better forum targeting Java web/servlet programming. If anyone does know of one, could you let me know? I'm basically wondering if others have found effective ways to avoid the tempting but bad practice of loading up the session with all sorts of

RE: putting custom code in front of Struts Main Servlet

2002-07-31 Thread jeff . guttadauro
This also depends on when you want the code executed. I believe overriding init will only make that code execute when the servlet is first created. If you want code executed on every call to the process method, someone here did it by overriding the processPreprocess (method name? - have to chec

RE: manager app

2002-07-25 Thread jeff . guttadauro
Thanks for the suggestion, Derrick. I just double-checked the manager app's web.xml, and it looks good. I haven't changed it from the default installation anyway, but here's what the security-constraint looks like. Entire Application /* manager

manager app

2002-07-25 Thread jeff . guttadauro
Anybody have any ideas what I could be doing wrong? This is how I have my tomcat-users.xml file set up in my $CATALINA_HOME/conf directory. I've done a restart (actually several) since adding tcuser. When I try to go to http://localhost:8080/manager, it prompts me for username and password. I

RE: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue

2002-07-24 Thread jeff . guttadauro
Hmm...no exceptions - I guess this is a different problem than what I've run into then. Sorry I couldn't help. Good luck with your troubleshooting. To change buffer size, you can use the JSP directive: <%@ page buffer="16kb" %> or, I believe you can set it on the response with setBufferSize( b

RE: RequestDispatcher forward versus response.sendRedirect

2002-07-24 Thread jeff . guttadauro
As far as I know, it sounds right to me... "Jason Stortz"

RE: RequestDispatcher forward versus response.sendRedirect

2002-07-24 Thread jeff . guttadauro
Hi, Jason. I believe that that is precisely the intended use of the response.sendRedirect ... when you are redirecting OFF your site (to an absolute path). The specs say that sendRedirect takes an absolute path, so it is not good to use for forwarding around within your site, where relativ

Re: Apache 2.0.39 and Tomcat 4.1.8 Servlet issue

2002-07-24 Thread jeff . guttadauro
Hi, Dave. Did you check your log files for exceptions? I've seen behavior similar to what you're describing with Tomcat 4.0.x running Standalone. What I've seen is that it gets a full buffer's (defaults to 8K, like you're seeing, but can be set to different size) worth of content and disp

RE: Error - Please Help

2002-07-12 Thread jeff . guttadauro
Shouldn't moving the tools.jar be unnecessary if JAVA_HOME is set properly?? "Jacob Lund"

Re: Cannot use bean from jsp, but servlet ok. I'm dying!

2002-07-11 Thread jeff . guttadauro
Actually, no, it looks like I was mistaken. Looking again at the error message, it does seem like the seemingly malformed tag is understood to be a JSP expression tag and the generated servlet code is correctly set to "out.print( FormBean.getUserName() );" Sorry, don't know what the problem is

Re: Cannot use bean from jsp, but servlet ok. I'm dying!

2002-07-11 Thread jeff . guttadauro
I think it is just a simple syntax error. The JSP expression tag on your userName text field is incorrect - needs to be <%= without the space. You have a scriptlet with =FormBean.getUserName() trying to be executed. It's interesting to see that it looks like Tomcat equates an equals sign befor

Re: Beans in packages vs beans not in packages

2002-07-11 Thread jeff . guttadauro
Hi, Ron. This is because Tomcat puts the servlets generated from JSP's in the org.apache.jsp package. Therefore, when you reference your bean with no package specified, it looks for it in this package and does not find it there. You should see that as part of the error message - something

Re: Need Ideas... big problem! (long)

2002-07-10 Thread jeff . guttadauro
The servlet engine handles it for you. Definitely take a look at some examples and the servlet spec, and it'll start to make more sense. "Christian J.

Re: Need Ideas... big problem! (long)

2002-07-10 Thread jeff . guttadauro
Hi, Christian. I would recommend now taking a good look at the Java Servlet Specification and letting all these suggestions digest while you go through that. Things should start to make more sense once you have a better handle on servlets. Maybe take a look at the Tomcat servlet examples

RE: Need Ideas... big problem! (long)

2002-07-10 Thread jeff . guttadauro
Well, the classes themselves wouldn't be used to get the init params or read the db.properties file. You would use a Servlet to do that, and then you would just pass the params (or Connections created from those params - however you're doing things) to the instance of the DAO class you would be

RE: Need Ideas... big problem! (long)

2002-07-09 Thread jeff . guttadauro
If you don't want to go the JNDI route, you could also do something like set init params in each application's web.xml file with the db connection info or create a .properties file for each application and read in the db connection info from that. HTH, -Jeff

Re: Database locked by Tomcat

2002-06-11 Thread jeff . guttadauro
Hi, Kevin. Correction: Database locked by YOU! :) You've closed the statement but not the connection. You need a conn.close() after the commit. This shouldn't lock the database by itself, although if you keep leaving connections open, then you will eventually hit a connection max limit,

Re: Jspc & i18n

2002-04-11 Thread jeff . guttadauro
It looks like the output is probably in UTF-8 format. If you use the <%@ page contentType="text/html;charset=UTF-8" %> directive in your page, that should instruct the browser to use that encoding for display. To see if this should work, you should be able to just manually change your browser's

Re: Jspc & i18n

2002-04-10 Thread jeff . guttadauro
Hi, Christian. I haven't run into this problem before, so I'm not sure, but it looks like the compiler is encoding the accented characters. Perhaps if you specify the JSP page's encoding, it won't do that anymore...? Try using a directive at the top of your JSP to do this, something like

Re: NullPointerException when using JDBC ResultSet next() method

2002-04-08 Thread jeff . guttadauro
You sure that your "test" table has a "test" column? Change rs.getString ("test") to rs.getString(1) to see if that works... HTH "Philip

Re: Multiple users share java bean?

2002-03-25 Thread jeff . guttadauro
If you have multiple users sharing the same bean, then that's what's going to happen. By synchronizing the get and set method, all you're doing is saying "Make sure the user finishes this whole get or set method before any other user can start it." However, that won't prevent another user from

RE: Struggling for one week please Help Help..................

2002-03-20 Thread jeff . guttadauro
I would suspect that your "return boolean" line in your defineCFDatabase method would be causing problems. Uma Munugala

Re: Error 500, Examples work

2002-03-12 Thread jeff . guttadauro
I ran into this a while back. Attribute "page" has no value!? ...quite a bizarre error, isn't it? I think that what I found out about this was that it happens for particularly large jsp pages (not large in terms of lots of HTML output but in terms of having lots of code in them) for some unknow

Re: Large pages not completely displayed with IE 5.x and Tomcat 4 .0.x

2002-03-12 Thread jeff . guttadauro
I ran into what I think is this problem before too, and here's what I ended up finding... I noticed the same thing as you, that the HTML was incomplete. My HTML was stopped right in the middle of a big list of SELECT OPTION's. I thought there was something wrong with the particular option that

Re: Help : Error Starting Tomcat 4.0.1 in AIX

2002-03-11 Thread jeff . guttadauro
Did you actually look at these log files first? I only know a few words in French, but enough to see from your catalina.out that it could not create a jar file cache in your /tmp directory because it doesn't exist. The errors in the localhost_log file seem to result from this as well, so why do

RE: How can I resolve this "IllegalStateException: Response has a lrea dybeen committed" problem?

2002-03-08 Thread jeff . guttadauro
If you are getting any pages back from the server, then you are using the response object! You may not be manipulating it with an explicit reference to it, but, when you have HTML or do an <% out.println("STUFF") %> or output a JSP expression like <%= something %> in your JSP pages, you are usin

Re: XSL - Reload a resource without restarting

2002-02-28 Thread jeff . guttadauro
Hi, Oliver. I can offer an idea (doubt it would qualify as brilliant though - sorry). If you do a getResource from the ServletContext, it will give you a java.net.URL. Then, maybe you could do an openConnection on the URL to get a URLConnection. Then, try the getLastModified method on that.

Re: Writing a bean

2002-02-25 Thread jeff . guttadauro
Additionally, there are syntax problems with your insert statement line as well (missing double quotes around the whole parameter). Might want to think about taking these kind of questions to a java newsgroup (comp.lang.java.help or comp.lang.java.programmer) for more/better responses, since the

Re: still suffering character-encoding woes

2002-02-21 Thread jeff . guttadauro
Hi, Richard. I can definitely relate. This frustrated (sort of still does frustrate) me to no end. Let me try to explain what I understand after wrestling with this for a while. (gurus, if anything isn't quite right, please chime in!) 1.) The following are all supposed to have the same

Re: Newbie can't run own JSP in Tomcat (404 - File Not Found)

2002-02-18 Thread jeff . guttadauro
Hi, Brian. This doesn't tell you that it can't find the class referenced in your JSP page. If that were the case, you wouldn't have gotten a 404 error - you would've gotten to a page with a class not found exception. That tells you that it can't find the JSP page itself. In order for Tom

Re: CDROM applications with tomcat

2002-02-14 Thread jeff . guttadauro
Just noticed that you're using tomcat 3.2, so this wouldn't be an option unless you upgraded to version 4. I don't know of a way to do it under version 3 (doesn't mean there isn't one).

Re: CDROM applications with tomcat

2002-02-14 Thread jeff . guttadauro
Hi, Franck. I'm not sure if this would work, but maybe you could try to define a $CATALINA_BASE that is on the hard disk while keeping the $CATALINA_HOME pointed to the CD...? Just a thought. Good luck. -Jeff

restarting Tomcat 4

2002-02-14 Thread jeff . guttadauro
Hi. I was wondering if anyone out there has a good way of restarting Tomcat 4...? In version 3, I used to just be able to do "$TOMCAT_HOME/bin/shutdown.sh; $TOMCAT_HOME/bin/startup.sh". Now, in version 4 though, since the starting and stopping scripts seem to have been modified to be backg

Re: Unjar a war??

2002-02-13 Thread jeff . guttadauro
jar -xf filename.war John Wadkin

Re: Redirect after session expires?

2002-02-13 Thread jeff . guttadauro
Or you could just do that... :/ Very cool! Thanks for that nugget, Christopher. "Christopher

Re: Redirect after session expires?

2002-02-13 Thread jeff . guttadauro
There is no session.isInvalid() method - that wouldn't make any sense anyway. If you have an actual session to ask if it's valid or not, how could it ever be invalid? There is an isNew() method, and I have not used this, but from reading the spec it doesn't sound like it will do the trick. Ther

Re: Internationalization

2002-02-13 Thread jeff . guttadauro
Hi, Christopher. Here are some things to look into... - Make sure that your JSP page is set to use a font that can display the specific Unicode characters. If it's just a specific subset of the Unicode character set, then you may be able to find a lightweight font that handles that specifi

Re: Switching on UTF-8 Encoding

2002-02-07 Thread jeff . guttadauro
You can use <%@ page contentType="text/html;charset=UTF-8" %> in the JSP or alternatively include the tag in your HTML. This will tell the browser to use the UTF-8 Encoding. Then when getting the requests, you can do a request.setCharacterEncoding ("UTF-8") before getting anything from the req

Re: web.xml Question

2002-01-22 Thread jeff . guttadauro
It's included in $CATALINA_HOME/common/lib/servlet.jar. Tom Bednarz

Re: getInitParameter from within a bean?

2002-01-17 Thread jeff . guttadauro
Hi, Ross. This sort of defeats the purpose of beans. You should develop your beans without any dependencies whatsoever on servlet-specific stuff, like requests or sessions. This way, your model is independent of the "web" environment and could be used in some other context. Your servlet

Re: Use of Java Classes in .JSP fails under Tomcat 3.2

2002-01-16 Thread jeff . guttadauro
It's just like the message says... parseInt( String ) is not a method found in your jsp page. Make that "Integer.parseInt(myString)" and you're golden. also... fyi, you don't close the tag in your html. HTH, -Jeff

Re: Problems with GET method

2002-01-14 Thread jeff . guttadauro
Hi, Luiz. I think the equals sign in the parameter value needs to be escaped. Take a look at the java.net.URLEncoder class to help with that. HTH, -Jeff

Tomcat generating HTML character entities - WHY?

2002-01-14 Thread jeff . guttadauro
Hi. This seems to be a new thing in Tomcat 4. I have a page set to Unicode (UTF-8) encoding. When I submit the form on this page, the characters of the input values are getting magically (I hate when things are done magically) transformed into the corresponding HTML Unicode character entit

Re: Tomcat Apache JSP compilation error

2002-01-14 Thread jeff . guttadauro
Since it's not in the java.lang package (the one you get for free), you need to import the class... <%@ page import="java.util.Vector" %> ... or reference it with its full package in your code.

Re: Caching of JSPs within Tomcat

2002-01-14 Thread jeff . guttadauro
Hi, Michael. The <%@ include ... %> tag is a static include, and, once the page that includes something like this has been compiled, a change to the included file will not trigger a recompile of the page. As far as I know, you have to either change the modification date of the main page (c

form values being sent as HTML entities instead of UTF-8 chars

2002-01-10 Thread jeff . guttadauro
Hello. I'm having a problem which I believe is related to Tomcat 4, since I didn't see this happening on 3.2 before I upgraded. I have a form on a page that is set to UTF-8 character encoding. When I paste a Unicode character into an input field and submit the form, the characters are bein