I've been using java.text.SimpleDateFormat for both parsing input and formatting output.
--David Steve R Burrus wrote: > Just thinking back to my past limited Java education, I think/believe that there is some kind of a method associated with the Date class that will allow you to both format the date-time display properly and specify which particular time zone that you want to use. Hope that helps. > > Christopher Schultz wrote: > > Grok, > > Grok Mogger wrote: > > > >>> I'm setting up Tomcat for the first time. I'm trying to use a simple > >>> test just to verify that I have everything set up properly, and I was > >>> hoping someone could confirm for me that I understand what I'm doing. > >>> > >>> I'm setting up Apache, mod_jk, and Tomcat on a (Debian) Linux server. > >>> > > > I would eliminate Apache and mod_jk from the equation for the time > being. Once you have everything working with (just) Tomcat, you can > evaluate whether or not to add Apache out front. > > > > >>> <HTML> > >>> <BODY> > >>> <p>Hello World!</p> > >>> <p>The time is now <%= new java.util.Date() %></p> > >>> </BODY> > >>> </HTML> > >>> > > > The page itself looks fine. > > > > >>> I have a test page (test.jsp) in my Apache www directory. > >>> > > > You probably have the JSP file in the wrong place. You need to put your > JSP files wherever Tomcat expects them to be. When you use Apache httpd > out in front of Tomcat, it merely delegates the request to Tomcat, so > Apache is not really involved in the process of actually running the > JSP, etc. > > > > >>> I'm coming from a PHP background and might be confused. > >>> > > > Coming from a PHP background, I can certainly understand why you did > what you did. PHP typically runs as a webserver plug-in (mod_php in this > case) and so Apache httpd sort-of manages the invocation of the PHP > processor. Tomcat interacts differently with the web server, which is > why I suggested that you drop that from your setup while you get started. > > Exactly what is necessary depends on your version of Tomcat (4.x, 5.0.x, > or 5.5.x), but you might be able to get away with dropping your JSP file > into the "webapps" directory in your Tomcat directory. > > Strictly speaking, you should probably create a formal webapp by > creating a subdirectory underneath "webapps" and including a context.xml > file in a WEB-INF subdirectory underneath that. But, just to get going > and convince yourself that "new java.lang.Date()" does, in fact, give > you the current date, you can probably just move your JSP file into the > "webapps" directory and try again. > > -chris > >> --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> >> --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]