Users and authentication - how?
Hi, I'm missing something very basic. I will develop a web application with users and authentication. Surely, there exists a relatively generic approach to this that includes a backend database, new user form and authentication rules! But I can't find. Can someone direct me as to where to start my research? Thanks! Dola - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
sysdeo: whoa, wait a minute
Hi, I'm evaluating everyone's advice (thank you, by they way!!!) concerning IDE's for jsp development and the first thing I tried was sysdeo with eclipse (webtools next, then netbeans). Boy, am I getting a surprise. So I created a Tomcat Project (right?) and pointed to the directory that already has all of my jsp pages. Now I see the new project and the list of the jsp files. So far so good. But I'm not getting any help from the IDE! I need: highlighting, indenting, and "automatic building" or any kind of building, but I'm not getting any of that!!! These are the only things that actually need from my IDE as (so far) I'm using ant to compile and deploy. Was I naive to expect to get these features? Or am I missing something now? Thanks in advance! Dola __ 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: sysdeo: whoa, wait a minute
Thanks! Just to confirm: "also", not "instead". --- Ovidiu Hurducas <[EMAIL PROTECTED]> wrote: > Hi, > Sysdeo Tomcat plugin is doing the building stuff > automatically so check > your WEB-INF/classes folder. Also it is good for > debugging web applications. > However if you want syntax highlighting/autocomplete > in your jsp files > you should also install WTP from Eclipse. > > Cheers, > > Ovidiu > > > Dola Woolfe wrote: > > Hi, > > > > I'm evaluating everyone's advice (thank you, by > they > > way!!!) concerning IDE's for jsp development and > the > > first thing I tried was sysdeo with eclipse > (webtools > > next, then netbeans). > > > > Boy, am I getting a surprise. So I created a > Tomcat > > Project (right?) and pointed to the directory that > > already has all of my jsp pages. Now I see the new > > project and the list of the jsp files. So far so > good. > > > > > > But I'm not getting any help from the IDE! I need: > > highlighting, indenting, and "automatic building" > or > > any kind of building, but I'm not getting any of > > that!!! These are the only things that actually > need > > from my IDE as (so far) I'm using ant to compile > and > > deploy. > > > > > > Was I naive to expect to get these features? Or am > I > > missing something now? > > > > Thanks in advance! > > > > Dola > > > > __ > > 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] > > > > > - > 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]
WTP installation question
Hi, If I have eclipse (and sysdeo) up and running already, what do I need to download to install WTP. I downloaded the all-in-one package, but that seems to have everything, including Eclipse! I'm afraid that if I were to use that it'll overwrite my current settings and other plugins in the Eclipse installation that I already have. Maybe I should just download "Runtime". Basically, I'm confused by all of this! Please help. Thanks! Dola __ 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]
Context starts twice
Hi, I don't know what I did wrong, but my StartUp servlet now runs twice in a row when I start Tomcat. The web.xml entry is StartUp servlets.StartUp 1 I don't even know where to begin looking for the error. Do you have any suggestions? Many thanks in advance! Dola __ 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: Context starts twice
It's Tomcat 5.5.15 Yes init runs twice. I deploy in a non-professional way: 1. compile .java with ant, jar my classes and put the jar under WEB-INF/lib, and compile jsp's into WEB-INF/classes/org/... So I don't think I have a .war anywhere. The one change is that I just created a Tomcat Project in Eclipse so maybe eclipse is doing something I don't know about. Thanks! Dola --- "Asensio, Rodrigo" <[EMAIL PROTECTED]> wrote: > Dola, this a production enviroment ? Or a IDE > enviroment ? > Why you said that is running twice ? Its calling > twice to the init ??? > > regards > > -Original Message- > From: Dola Woolfe [mailto:[EMAIL PROTECTED] > Sent: Monday, March 27, 2006 3:42 PM > To: Tom Cat > Subject: Context starts twice > > Hi, > > I don't know what I did wrong, but my StartUp > servlet now runs twice in > a row when I start Tomcat. The web.xml entry is > > StartUp > servlets.StartUp > 1 > > I don't even know where to begin looking for the > error. Do you have any > suggestions? > > Many thanks in advance! > > Dola > > __ > 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] > > > This message (including any attachments) contains > confidential > and/or proprietary information intended only for the > addressee. > Any unauthorized disclosure, copying, distribution > or reliance on > the contents of this information is strictly > prohibited and may > constitute a violation of law. If you are not the > intended > recipient, please notify the sender immediately by > responding to > this e-mail, and delete the message from your > system. If you > have any questions about this e-mail please notify > the sender > immediately. > > Ce message (ainsi que les eventuelles pieces > jointes) est > exclusivement adresse au destinataire et contient > des > informations confidentielles. La copie, la > communication ou la > distribution du contenu de ce message sans l'accord > prealable de > l'expediteur sont strictement interdits et peuvent > constituer un > delit. Si vous n'etes pas destinataire de ce > message, merci de le > detruire et d'avertir l'expediteur. Si vous avez des > questions se > rapportant a ce courrier electronique, merci de bien > vouloir > notifier > l'expediteur immediatement. > > - > 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: Context starts twice
Hi, I'm sorry, can you give a couple examples with dir names? For example, I'm not sure what appbase is. Thanks! Dola --- Vivek Mohan <[EMAIL PROTECTED]> wrote: > This can happen if you have a separate context path > configured for > your webapp and its present in your appbase. If > thats the case, then > Tomcat will try to load the webapp twice, once for > the different > context path and once for the presence of the war or > folder in > appbase. This is a known feature(or bug) in Tomcat. > > Try keeping your webapp outside of your appbase and > re-loading should > not happen. > -- > Vivek. > > On 3/28/06, Jean-Philippe Boily > <[EMAIL PROTECTED]> wrote: > > Hi, > >What version of Tomcat are you using ? Maybe > your war is under your > > appbaseif it so, it may starts your context > once with the > > context.xml file and once with the WAR > > > > > > Good luck ! > > Jean-Philippe Boily > > > > On 3/27/06, Dola Woolfe <[EMAIL PROTECTED]> > wrote: > > > Hi, > > > > > > I don't know what I did wrong, but my StartUp > servlet > > > now runs twice in a row when I start Tomcat. The > > > web.xml entry is > > > > > > StartUp > > > > servlets.StartUp > > > 1 > > > > > > I don't even know where to begin looking for the > > > error. Do you have any suggestions? > > > > > > Many thanks in advance! > > > > > > Dola > > > > > > > __ > > > 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] > > > > > > > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > -- > I told the doctor I broke my leg in two places. He > told me to quit > going to those places. > > - > 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: Context starts twice
OK, I see it - it's "webapps". Thank you. OK, how do I check wheather "[I] have a separate context path configured for your webapp and its present in your appbase." No idea where to look and for what! Thanks! --- "Farrow, Marc" <[EMAIL PROTECTED]> wrote: > Appbase is an attribute defined in your > %tomcat_home%/conf/server.xml file. > It should be a "sub-attribute" under your HOSTS > attribute. > > > -Original Message- > From: Dola Woolfe [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 29, 2006 1:48 PM > To: Tomcat Users List > Subject: Re: Context starts twice > > Hi, > > I'm sorry, can you give a couple examples with dir > names? For example, I'm not sure what appbase is. > > Thanks! > > Dola > > --- Vivek Mohan <[EMAIL PROTECTED]> wrote: > > > This can happen if you have a separate context > path > > configured for > > your webapp and its present in your appbase. If > > thats the case, then > > Tomcat will try to load the webapp twice, once for > > the different > > context path and once for the presence of the war > or > > folder in > > appbase. This is a known feature(or bug) in > Tomcat. > > > > Try keeping your webapp outside of your appbase > and > > re-loading should > > not happen. > > -- > > Vivek. > > > > On 3/28/06, Jean-Philippe Boily > > <[EMAIL PROTECTED]> wrote: > > > Hi, > > > What version of Tomcat are you using ? Maybe > > your war is under your > > > appbaseif it so, it may starts your context > > once with the > > > context.xml file and once with the WAR > > > > > > > > > Good luck ! > > > Jean-Philippe Boily > > > > > > On 3/27/06, Dola Woolfe <[EMAIL PROTECTED]> > > wrote: > > > > Hi, > > > > > > > > I don't know what I did wrong, but my StartUp > > servlet > > > > now runs twice in a row when I start Tomcat. > The > > > > web.xml entry is > > > > > > > > StartUp > > > > > > servlets.StartUp > > > > 1 > > > > > > > > I don't even know where to begin looking for > the > > > > error. Do you have any suggestions? > > > > > > > > Many thanks in advance! > > > > > > > > Dola > > > > > > > > > > __ > > > > 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] > > > > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > > -- > > I told the doctor I broke my leg in two places. He > > told me to quit > > going to those places. > > > > > - > > 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] > > > > - > 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: Context starts twice
Yes I do!!! Thank you. My guess is that Eclipse sneaked that line in there when I experimented with creating Tomcat projects. Good grief! Thanks again. --- Vivek Mohan <[EMAIL PROTECTED]> wrote: > Do you have any context entries in your server.xml? > Or context.xml > files present in other folders in the tomcat > installation? If yes, > then check if their path attribute is set to > something different from > their folder names? > > -- > Vivek. > > On 3/30/06, Dola Woolfe <[EMAIL PROTECTED]> wrote: > > OK, I see it - it's "webapps". Thank you. > > > > OK, how do I check wheather "[I] have a separate > > context path configured for your webapp and its > > present in your appbase." No idea where to look > and > > for what! > > > > Thanks! > > > > > > --- "Farrow, Marc" <[EMAIL PROTECTED]> wrote: > > > > > Appbase is an attribute defined in your > > > %tomcat_home%/conf/server.xml file. > > > It should be a "sub-attribute" under your HOSTS > > > attribute. > > > > > > > > > -Original Message- > > > From: Dola Woolfe [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, March 29, 2006 1:48 PM > > > To: Tomcat Users List > > > Subject: Re: Context starts twice > > > > > > Hi, > > > > > > I'm sorry, can you give a couple examples with > dir > > > names? For example, I'm not sure what appbase > is. > > > > > > Thanks! > > > > > > Dola > > > > > > --- Vivek Mohan <[EMAIL PROTECTED]> wrote: > > > > > > > This can happen if you have a separate context > > > path > > > > configured for > > > > your webapp and its present in your appbase. > If > > > > thats the case, then > > > > Tomcat will try to load the webapp twice, once > for > > > > the different > > > > context path and once for the presence of the > war > > > or > > > > folder in > > > > appbase. This is a known feature(or bug) in > > > Tomcat. > > > > > > > > Try keeping your webapp outside of your > appbase > > > and > > > > re-loading should > > > > not happen. > > > > -- > > > > Vivek. > > > > > > > > On 3/28/06, Jean-Philippe Boily > > > > <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > >What version of Tomcat are you using ? > Maybe > > > > your war is under your > > > > > appbaseif it so, it may starts your > context > > > > once with the > > > > > context.xml file and once with the WAR > > > > > > > > > > > > > > > Good luck ! > > > > > Jean-Philippe Boily > > > > > > > > > > On 3/27/06, Dola Woolfe <[EMAIL PROTECTED]> > > > > wrote: > > > > > > Hi, > > > > > > > > > > > > I don't know what I did wrong, but my > StartUp > > > > servlet > > > > > > now runs twice in a row when I start > Tomcat. > > > The > > > > > > web.xml entry is > > > > > > > > > > > > StartUp > > > > > > > > > > > servlets.StartUp > > > > > > 1 > > > > > > > > > > > > I don't even know where to begin looking > for > > > the > > > > > > error. Do you have any suggestions? > > > > > > > > > > > > Many thanks in advance! > > > > > > > > > > > > Dola > > > > > > > > > > > > > > > > > __ > > > > > > 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] > > > > > > > > > > > > > > > > > > &g
Changing content type on reload
Hi, I'm going to attempt asking a question by giving incomplete information but I am still hoping to get an answer. The complete story would be too cumbersome to describe. Basically here's a snippet of my code: <[EMAIL PROTECTED] errorPage="ErrorPage.jsp" contentType="application/x-java-jnlp-file"%> <[EMAIL PROTECTED] file="InitializePage.jsp"%> <% if (user == null) throw new servlets.Authentication.Exception("User is null"); else if (!user.belongsTo(1L)) { throw new servlets.Authentication.Exception("Insufficient access"); } %> Info Flow System Application // ETC WHen the exception is fielded by the error page, the user is presented with a login form and when he/she logs in, the page is reloaded (with javascript). The problem is that the xml code, rather than invoking jnlp, is displayed as if it were HTML and jnlp kicks in only when the user reloads. This is with IExplorer. Anything I can do about this from the tomcat point of view? Thanks much in advance! Dola - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Changing content type on reload
Just as a quick follow up, this works in Firefox, but not in IE. --- On Thu, 7/17/08, Dola Woolfe <[EMAIL PROTECTED]> wrote: > From: Dola Woolfe <[EMAIL PROTECTED]> > Subject: Changing content type on reload > To: "Tom Cat" <[EMAIL PROTECTED]> > Date: Thursday, July 17, 2008, 10:51 PM > Hi, > > I'm going to attempt asking a question by giving > incomplete information but I am still hoping to get an > answer. The complete story would be too cumbersome to > describe. > > Basically here's a snippet of my code: > > <[EMAIL PROTECTED] errorPage="ErrorPage.jsp" > contentType="application/x-java-jnlp-file"%> > <[EMAIL PROTECTED] file="InitializePage.jsp"%> > <% >if (user == null) > throw new servlets.Authentication.Exception("User > is null"); >else if (!user.belongsTo(1L)) { > throw new > servlets.Authentication.Exception("Insufficient > access"); >} > %> > > encoding="utf-8"?> > > > > > Info Flow System Application > > > // ETC > > WHen the exception is fielded by the error page, the user > is presented with a login form and when he/she logs in, the > page is reloaded (with javascript). The problem is that the > xml code, rather than invoking jnlp, is displayed as if it > were HTML and jnlp kicks in only when the user reloads. > This is with IExplorer. > > Anything I can do about this from the tomcat point of view? > > Thanks much in advance! > > Dola > > > > > > - > 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]
JspC woes in Tomcat 6 (Urgent)
Hi, Just upgraded my Tomcat from 5.5 to 6.0 and noticed that my JspC task in build.xml is no longer working. The documentation for 6.0 quote is below, but with 6.0 there seems to be no such thing as server/lib and common/lib, so something is not right. Could someone plese tell me how to fix this? Thanks, Dola - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JspC woes in Tomcat 6 (Urgent)
Thank you! --- On Thu, 9/18/08, Jess Holle <[EMAIL PROTECTED]> wrote: > From: Jess Holle <[EMAIL PROTECTED]> > Subject: Re: JspC woes in Tomcat 6 (Urgent) > To: "Tomcat Users List" > Cc: "Tom Cat" <[EMAIL PROTECTED]> > Date: Thursday, September 18, 2008, 2:21 PM > Try something like > > classname="org.apache.jasper.JspC" > name="jasper2" > > > location="${java.home}/../lib/tools.jar"/> > > > > location="${tomcatHome}/lib"/> > > > > > > > Dola Woolfe wrote: > > Hi, > > > > Just upgraded my Tomcat from 5.5 to 6.0 and noticed > that my JspC task in build.xml is no longer working. The > documentation for 6.0 quote is below, but with 6.0 there > seems to be no such thing as server/lib and common/lib, so > something is not right. Could someone plese tell me how to > fix this? > > > > Thanks, > > > > Dola > > > >classname="org.apache.jasper.JspC" > name="jasper2" > > > > >location="${java.home}/../lib/tools.jar"/> > >dir="${ENV.CATALINA_HOME}/server/lib"> > > > > > >dir="${ENV.CATALINA_HOME}/common/lib"> > > > > > > > > > > > > > > > > > > > > > > > - > > 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] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to make a webapp restart
Hi, What setting makes a webapp restart when a .jar changes under tomcat/lib? Many thanks in advance, Dola - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to make a webapp restart
- Original Message From: "Caldarale, Charles R" To: Tomcat Users List Sent: Mon, June 28, 2010 5:54:47 PM Subject: RE: How to make a webapp restart > From: Dola Woolfe [mailto:dolac...@yahoo.com] > Subject: How to make a webapp restart > > What setting makes a webapp restart when a .jar changes under > tomcat/lib? Nothing. Since the jar is in tomcat/lib, it's handled by the common class loader, so you have to restart Tomcat to get the updated jar recognized. If the jar were in the webapp's WEB-INF/lib directory, you could restart just that one webapp. - Chuck Thanks, Chuck. And is there a setting to have Tomcat automatically restarted when jar changes under tomcat/lib? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to make a webapp restart
How about this trick then. Whenever I recompile a library under tomcat/lib, I also "touch" an "empty" .jar file under WEB-INF/lib. That seems to work, BUT: it states: Jun 29, 2010 2:08:36 PM org.apache.catalina.core.StandardContext reload INFO: Reloading this Context has started but a 1 servlet does not fire again. What's the explanation. Thanks again, Dola - Original Message From: Pid To: Tomcat Users List Sent: Tue, June 29, 2010 5:16:41 AM Subject: Re: How to make a webapp restart On 28/06/2010 23:22, Dola Woolfe wrote: > > > > > - Original Message > From: "Caldarale, Charles R" > To: Tomcat Users List > Sent: Mon, June 28, 2010 5:54:47 PM > Subject: RE: How to make a webapp restart > >> From: Dola Woolfe [mailto:dolac...@yahoo.com] >> Subject: How to make a webapp restart >> >> What setting makes a webapp restart when a .jar changes under >> tomcat/lib? > > Nothing. Since the jar is in tomcat/lib, it's handled by the common class > loader, so you have to restart Tomcat to get the updated jar recognized. If > the jar were in the webapp's WEB-INF/lib directory, you could restart just > that one webapp. > > - Chuck > > > > Thanks, Chuck. > > And is there a setting to have Tomcat automatically restarted when jar > changes under tomcat/lib? No there isn't. p > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
PDF to acrobat
Hi, I set response.setContentType("application/pdf"); as a result, the served up content triggers a "Download" rather than opening acrobat within browser window. Do I get to control what happens at client end? I want acrobat to open within browser. How do I achieve that? Thanks, Dola - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to make a webapp restart
Yes, you make good points Chuck. By "work" I mean that I get the message: "INFO: Reloading this Context has started" but "not fire" I mean that init() does not get called. Many thanks in advance, Pavel - Original Message From: "Caldarale, Charles R" To: Tomcat Users List Sent: Tue, June 29, 2010 2:26:25 PM Subject: RE: How to make a webapp restart > From: Dola Woolfe [mailto:dolac...@yahoo.com] > Subject: Re: How to make a webapp restart > > Whenever I recompile a library under tomcat/lib, I also > "touch" an "empty" .jar file under WEB-INF/lib. > > That seems to work What do you mean by "work"? That will typically reload the webapp (assuming a default Tomcat configuration), but your new jar in Tomcat's lib directory is completely independent of that. > but a 1 servlet > does not fire again. How do you know it "does not fire again"? (Better to use precise terminology; do you mean the init() method is not called?) - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: PDF to acrobat
Then I guess I am asking about most common default settings. For example, when I click on PDF links, sometimes it opens the file in the browser window and at other times it downloads the file. What's the possible difference in the (common default) settings? Thanks, Dola - Original Message From: Thad Humphries To: Tomcat Users List Sent: Tue, June 29, 2010 3:14:03 PM Subject: Re: PDF to acrobat What happens on the browser end is entirely up to the user. It's subject to the browser they are using, whatever browser plug-ins they've installed, and how they've set those plug-ins. On Tue, Jun 29, 2010 at 3:08 PM, Dola Woolfe wrote: > Hi, > > I set > > response.setContentType("application/pdf"); > > > as a result, the served up content triggers a "Download" rather than > opening acrobat within browser window. > > > Do I get to control what happens at client end? I want acrobat to open > within browser. > > How do I achieve that? > > Thanks, > > Dola > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > -- "Hell hath no limits, nor is circumscrib'd In one self-place; but where we are is hell, And where hell is, there must we ever be" --Christopher Marlowe, 'Doctor Faustus' (v, 121-24) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: PDF to acrobat
There we go. Thank you! - Original Message From: David Fisher To: Tomcat Users List Sent: Tue, June 29, 2010 3:41:18 PM Subject: Re: PDF to acrobat You will want to do this: response.setContentType("application/pdf"); response.setHeader("Content-disposition", "inline"); For an attachment / download you will want to do: response.setContentType("application/pdf"); response.setHeader("Content-disposition", "attachment;filename=downloaded.pdf"); Of course browser settings and how your Adobe Reader, Preview or Browser plugins are configured may override the "inline"? What browsers and OS's matter to you? Older IE versions are pretty sticky. Firefox can be set to download no matter what. Regards, Dave On Jun 29, 2010, at 12:08 PM, Dola Woolfe wrote: > Hi, > > I set > > response.setContentType("application/pdf"); > > > as a result, the served up content triggers a "Download" rather than opening > acrobat within browser window. > > > Do I get to control what happens at client end? I want acrobat to open within > browser. > > How do I achieve that? > > Thanks, > > Dola > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to make a webapp restart
Hi, I know whether init is called by a System.out.println("Hi") with a flush command. This servlet is never used by a request. But it is a 1 servlet. Thanks again, Dola - Original Message From: "Caldarale, Charles R" To: Tomcat Users List Sent: Tue, June 29, 2010 4:05:51 PM Subject: RE: How to make a webapp restart > From: Dola Woolfe [mailto:dolac...@yahoo.com] > Subject: Re: How to make a webapp restart > > but "not fire" I mean that init() does not get called. Does the init() method get called later, when the servlet is actually used by a request? How do you know if the init() method is called or not? - 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: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
JSP -> static mirroring
Hi, I have built a website with Tomcat, but all the pages are essentially static, as there are no forms, etc. I used JSP because I have libraries that produce HTML. Now I want to move the pages to a webhost that doesn't support JSP so basically I need to convert my pages to static. "wget -m" works, but it saves my pages with a .jsp extension, which conuses many broswers so what I basically need is "wget -m --convert-jsp-to-html". Does anything like that exist? Thank you very much in advance! Aaron Fude Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP -> static mirroring
--- Mladen Turk <[EMAIL PROTECTED]> wrote: > Dola Woolfe wrote: > > Hi, > > > > I have built a website with Tomcat, but all the > pages > > are essentially static, as there are no forms, > etc. I > > used JSP because I have libraries that produce > HTML. > > > > Now I want to move the pages to a webhost that > doesn't > > support JSP so basically I need to convert my > pages to > > static. > > > > "wget -m" works, but it saves my pages with a .jsp > > extension, which conuses many broswers so what I > > basically need is "wget -m --convert-jsp-to-html". > > Does anything like that exist? > > > > > > What's wrong with > wget tomcat.apache.org -O tomcat.main.page.html ? > or > wget http://www.java.com/en/download/manual.jsp -O > manual.html > > Regards, > Mladen > I need to recursively traverse the entire website and replace jsp with html in all embedded links. Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more! http://tv.yahoo.com/collections/3658 - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP -> static mirroring
--- Hassan Schroeder <[EMAIL PROTECTED]> wrote: > On 9/15/07, Dola Woolfe <[EMAIL PROTECTED]> wrote: > > > I have built a website with Tomcat, but all the > pages > > are essentially static, as there are no forms, > etc. I > > used JSP because I have libraries that produce > HTML. > > > > Now I want to move the pages to a webhost that > doesn't > > support JSP so basically I need to convert my > pages to > > static. > > Batch-rename all your .jsp files to .html, mass > search-and-replace > all the internal links appropriately, and configure > Tomcat to process > .html files as JSPs. > > Then wget the site and you're set. :-) > > HTH, > -- > Hassan Schroeder > [EMAIL PROTECTED] > Sounds like a great idea. How do I configure Tomcat to process .html files as .jsp? (Please be specific if you can.) Many thanks in advance! Dola Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games. http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: JSP -> static mirroring
Hassan, that's terrific, thank you! Would you happen to know how to get Eclipse to parse, compile, and highlight .html's the same way it does .jsp's? Thanks again! Dola --- Hassan Schroeder <[EMAIL PROTECTED]> wrote: > On 9/19/07, Dola Woolfe <[EMAIL PROTECTED]> wrote: > > How do I configure Tomcat to process .html files > as .jsp? > > Add this to the web.xml of the relevant Context: > > > jsp > *.html > > > That's it :-) > > HTH! > -- > Hassan Schroeder > [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] > > Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. http://mobile.yahoo.com/go?refer=1GNXIC - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
InvalidClassException between Tomcat and Eclipse
Hi, I get java.io.InvalidClassException when I send a serialized class from an application launched by Eclipse to a JSP page, compiled by the server. I thought that serialVersionUID was strictly a function of members, signatures, etc - but that doesn't appear to be the case. A workaround is to define serialVersionUID explicitly, but I would like to understand what's going on. Many thanks in advance! Dola - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: InvalidClassException between Tomcat and Eclipse
Thanks. Can you explain the idea behind serialVersionUID (or point to a link)? It seems (under ideal circumstances and not what I was conerned with previously) that if the classes are legitimately out of sync and I don't set it, I will get an exception saying that serialVersionUID is mismatched. If I do set it, I will get an invalid stram exception or something like that. I don't particularly care what exception I get. Thanks! Dola --- Yuval Perlov <[EMAIL PROTECTED]> wrote: > It is also affected by the compiler version. > > It is most advisable to add serialVersionUID > > Yuval Perlov > www.r-u-on.com > > On May 17, 2008, at 7:16 AM, Dola Woolfe wrote: > > Hi, > > I get > > java.io.InvalidClassException > > when I send a serialized class from an application > launched by Eclipse to a JSP page, compiled by the > server. > > I thought that serialVersionUID was strictly a > function of members, signatures, etc - but that > doesn't appear to be the case. > > A workaround is to define serialVersionUID > explicitly, > but I would like to understand what's going on. > > Many thanks in advance! > > Dola > > > > > - > 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] > > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can different webapps share a context?
Hi, I guess the subject asks the question... I have two different webapps and I want them to be able to share objects. Can that be done? I guess it sounds like an FAQ but I can't find the answer. Thanks! Aaron - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
.html pages as .jsp pages
Hi, I need to give my jsp files the extension .html 1. How do I configure tomcat to treat .html files as .jsp files? 2. Off topic? How do I set up Eclipse so that .html files are opened with the same editor as .jsp files and give me all of the syntax highlighting, etc. Many thanks in advance, Dola - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: .html pages as .jsp pages
I create pages dynamics pages in JSP. That way I control dynamic content and look at feel. Then I "wget -m" the whole website and upload it to the server where it acts as static content and I want all of my pages to have the usual .html extension. Let me know if you think the whole approach is stupid. --- On Thu, 5/14/09, Martin Gainty wrote: > From: Martin Gainty > Subject: RE: .html pages as .jsp pages > To: "Tomcat Users List" , > tomcat-u...@jakarta.apache.org > Date: Thursday, May 14, 2009, 3:09 PM > > > > > jsp > > org.apache.jasper.servlet.JspServlet > > > fork > > false > > > > xpoweredBy > > false > > > 3 > > > > > jsp > > *.html > > > could you elaborate the business need to do this..? > you would be invoking the JspServlet for pages > for pages which need no Jsp precompilation? > > Martin Gainty > __ > Disclaimer and Confidentiality/Verzicht und > Vertraulichkeitanmerkung/Note de déni et de > confidentialité > This message is confidential. If you should not be the > intended receiver, then we ask politely to report. Each > unauthorized forwarding or manufacturing of a copy is > inadmissible. This message serves only for the exchange of > information and has no legal binding effect. Due to the easy > manipulation of emails we cannot take responsibility over > the the contents. > Diese Nachricht ist vertraulich. Sollten Sie nicht der > vorgesehene Empfaenger sein, so bitten wir hoeflich um eine > Mitteilung. Jede unbefugte Weiterleitung oder Fertigung > einer Kopie ist unzulaessig. Diese Nachricht dient lediglich > dem Austausch von Informationen und entfaltet keine > rechtliche Bindungswirkung. Aufgrund der leichten > Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer > den Inhalt uebernehmen. > Ce message est confidentiel et peut être privilégié. Si > vous n'êtes pas le destinataire prévu, nous te demandons > avec bonté que pour satisfaire informez l'expéditeur. > N'importe quelle diffusion non autorisée ou la copie de > ceci est interdite. Ce message sert à l'information > seulement et n'aura pas n'importe quel effet légalement > obligatoire. Étant donné que les email peuvent facilement > être sujets à la manipulation, nous ne pouvons accepter > aucune responsabilité pour le contenu fourni. > > > > > > Date: Thu, 14 May 2009 11:43:47 -0700 > > From: dolac...@yahoo.com > > Subject: .html pages as .jsp pages > > To: tomcat-u...@jakarta.apache.org > > > > > > Hi, > > > > I need to give my jsp files the extension .html > > > > 1. How do I configure tomcat to treat .html files as > .jsp files? > > > > 2. Off topic? How do I set up Eclipse so that .html > files are opened with the same editor as .jsp files and give > me all of the syntax highlighting, etc. > > > > Many thanks in advance, > > > > Dola > > > > > > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > _ > Insert movie times and more without leaving Hotmail®. > http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: .html pages as .jsp pages
Exactly right. I produce my static content programmatically. Many pages are too complex to be generated otherwise. Also, I get to write java not html. When I want to change a font, I do it in one place not 1000 places. --- On Thu, 5/14/09, Hassan Schroeder wrote: > From: Hassan Schroeder > Subject: Re: .html pages as .jsp pages > To: "Tomcat Users List" > Date: Thursday, May 14, 2009, 5:04 PM > On Thu, May 14, 2009 at 1:43 PM, Ken > Bowen > wrote: > > Yes, but why the need to use the .jsp extension? A > static site would run > > just fine with everything as .html under > > either Tomcat or httpd or > > Missing the point -- we're talking about static > *deployment* of a > dynamically *generated* site. > > -- > Hassan Schroeder hassan.schroe...@gmail.com > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: .html pages as .jsp pages
Screws up the inner links! --- On Thu, 5/14/09, André Warnier wrote: > From: André Warnier > Subject: Re: .html pages as .jsp pages > To: "Tomcat Users List" > Date: Thursday, May 14, 2009, 6:52 PM > Dola Woolfe wrote: > > Exactly right. > > > > I produce my static content programmatically. > > Many pages are too complex to be generated otherwise. > > Also, I get to write java not html. > > When I want to change a font, I do it in one place not > 1000 places. > > > Allright, explanation accepted and makes sense. > ;-) > (We see all kinds on this forum, let me tell ya) > > Now just as an idea : leaving everything as it is, > apparently when you download those pages via wget, you get > them named as *.jsp, but they are otherwise ok, yes ? > Would not the simplest way in that case be, to write a > simple shell script that goes through this hierarchy of > files, and just renames them to *.html ? > I would bet that for a shell script specialist, that would > be a less than 5-line script or so. > Or does that screw up inner links or something ? > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: .html pages as .jsp pages
Hi, I did this but when I click on a .html file to open it, I'm still not getting syntax aware editing like I do with .jsp pages. It still think it's HTML. Anything else I should look at? Thanks --- On Fri, 5/15/09, Karthik Nanjangude wrote: > From: Karthik Nanjangude > Subject: RE: .html pages as .jsp pages > To: "Tomcat Users List" > Date: Friday, May 15, 2009, 9:44 AM > Hi > > An Offline topic ... :{ > > > >> Off topic? How do I set up Eclipse so that .html > files are opened with the same editor as .jsp > > In Eclipse --> windows --> Preference.. -> General > --> > > > Editors > --> File Associations > > Map the *.html file to Assiociate JSP Editor > > > > > Simple :) > > With regards > Karthik > > > > > -Original Message- > From: Nikola Milutinovic [mailto:alok...@yahoo.com] > Sent: Friday, May 15, 2009 4:45 PM > To: Tomcat Users List > Subject: Re: .html pages as .jsp pages > > Well, it should be relatively simple. Add the following to > your web.xml: > > > > jsp > > *.html > > > > Nix. > > > > > From: Dola Woolfe > To: Tom Cat > Sent: Thursday, May 14, 2009 8:43:47 PM > Subject: .html pages as .jsp pages > > > Hi, > > I need to give my jsp files the extension .html > > 1. How do I configure tomcat to treat .html files as .jsp > files? > > 2. Off topic? How do I set up Eclipse so that .html files > are opened with the same editor as .jsp files and give me > all of the syntax highlighting, etc. > > Many thanks in advance, > > Dola > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to refer to file?
Hi, Within a .jsp document, is there a way of referring to a file in same directory? For example, new java.io.File(ThisDir, "FileName.txt"). Thanks, Dola - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to refer to file?
Thanks, But why would a <%! %> tag make a file default to the same dir as the .jsp file. When I do <%! String content = new java.io.File("Hi.txt").getAbsolutePath(); %>, I get: C:\dc\tomcat\bin\Hi.txt --- On Mon, 5/18/09, Steve Yates wrote: > From: Steve Yates > Subject: Re: How to refer to file? > To: "Tomcat Users List" > Date: Monday, May 18, 2009, 1:28 AM > Dola Woolfe wrote: > > Hi, > > > > Within a .jsp document, is there a way of referring to > a file in same directory? > > > > For example, new java.io.File(ThisDir, > "FileName.txt"). > > > > Thanks, > > > > Dola > > > > > > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > Hi Dola, > > Is this something you really need to do in the view layer > like this? I > am going to assume you have a really good reason to do this > and say that > it is possible using the same approach as you would declare > a method in > a .JSP file. > > This is slightly different to the scriptlet approach <% > %> <%= %> etc > > You simply add a ! like so; > > <%! > *File myFile = new > java.io.File();* > > public String methodDeclaration(.) > { > //DoSomething > //... > return > StringUtils.EmptyString(); > } > %> > > Don't forget to include the appropriate package as an > "import" statement. > > RGS SY > > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Trouble editing .html and .jsp
Hi, In a recent email, I asked how to make Eclipse treat html files and jsp files. In other words, I want to give my jsp files extension html. I following the advice going to Window->Pref->Gen->Editors->Files Associations. But it had no effect. Even when I right-click on the file and choose Open With -> JSP Editor I don't get a JSP aware environment. I use the WST package version 3.0.0 (Eclipse version 3.4.0) Thanks, Dola - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
How to hot swap classes?
Hi, When developing a web application I change my classes all the time and therefore need to restart tomcat every time. Is there a way to avoid restarting tomcat? Could it hot swap the new class in? (It does somehow hot swap recompiled .jsp's doesn't it?) Many thanks in advance, Dola - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to hot swap classes?
You mean like this in tomcat/conf/context.xml Seems to have had no effect. --- On Tue, 5/19/09, Anurag Kapur wrote: > From: Anurag Kapur > Subject: Re: How to hot swap classes? > To: "Tomcat Users List" > Cc: "Tom Cat" > Date: Tuesday, May 19, 2009, 12:36 PM > Refer : http://tomcat.apache.org/tomcat-5.5-doc/config/context.html > > reloadable > > Set to true if you want Catalina to monitor classes in > /WEB-INF/classes/ and > /WEB-INF/lib for changes, and automatically reload the web > application if a > change is detected. This feature is very useful during > application > development, but it requires significant runtime overhead > and is not > recommended for use on deployed production applications. > That's why the > default setting for this attribute is *false*. You can use > the > Manager<http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html>web > application, however, to trigger reloads of deployed > applications on > demand. > Regards > Anurag > > -- > Anurag Kapur > Associate - Technology, > Sapient Corporation. > > +44 (0) 7514 996 586 > > http://www.linkedin.com/in/anuragkapur > ------ > Sent from London, Eng, United Kingdom > > On Tue, May 19, 2009 at 5:28 PM, Dola Woolfe > wrote: > > > > > Hi, > > > > When developing a web application I change my classes > all the time and > > therefore need to restart tomcat every time. Is there > a way to avoid > > restarting tomcat? Could it hot swap the new class > in? > > > > (It does somehow hot swap recompiled .jsp's doesn't > it?) > > > > Many thanks in advance, > > > > Dola > > > > > > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to hot swap classes?
My apologies - worked as advertised! The only thing I noticed is that it restarts the webapp right away - and all of the webapps that depend on the class. Is there way to make the webapp restart only when a page is requested and only the webapp that's being used? Thanks again! --- On Tue, 5/19/09, Dola Woolfe wrote: > From: Dola Woolfe > Subject: Re: How to hot swap classes? > To: "Tomcat Users List" > Date: Tuesday, May 19, 2009, 12:51 PM > > You mean like this > > > > in tomcat/conf/context.xml > > Seems to have had no effect. > > > > --- On Tue, 5/19/09, Anurag Kapur > wrote: > > > From: Anurag Kapur > > Subject: Re: How to hot swap classes? > > To: "Tomcat Users List" > > Cc: "Tom Cat" > > Date: Tuesday, May 19, 2009, 12:36 PM > > Refer : http://tomcat.apache.org/tomcat-5.5-doc/config/context.html > > > > reloadable > > > > Set to true if you want Catalina to monitor classes > in > > /WEB-INF/classes/ and > > /WEB-INF/lib for changes, and automatically reload the > web > > application if a > > change is detected. This feature is very useful > during > > application > > development, but it requires significant runtime > overhead > > and is not > > recommended for use on deployed production > applications. > > That's why the > > default setting for this attribute is *false*. You can > use > > the > > Manager<http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html>web > > application, however, to trigger reloads of deployed > > applications on > > demand. > > Regards > > Anurag > > > > > -- > > Anurag Kapur > > Associate - Technology, > > Sapient Corporation. > > > > +44 (0) 7514 996 586 > > > > http://www.linkedin.com/in/anuragkapur > > > -- > > Sent from London, Eng, United Kingdom > > > > On Tue, May 19, 2009 at 5:28 PM, Dola Woolfe > > wrote: > > > > > > > > Hi, > > > > > > When developing a web application I change my > classes > > all the time and > > > therefore need to restart tomcat every time. Is > there > > a way to avoid > > > restarting tomcat? Could it hot swap the new > class > > in? > > > > > > (It does somehow hot swap recompiled .jsp's > doesn't > > it?) > > > > > > Many thanks in advance, > > > > > > Dola > > > > > > > > > > > > > > > > > > - > > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > > > > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: How to hot swap classes?
Thanks! Where do I find the context.xml for a specific webapp? --- On Tue, 5/19/09, Hassan Schroeder wrote: > From: Hassan Schroeder > Subject: Re: How to hot swap classes? > To: "Tomcat Users List" > Date: Tuesday, May 19, 2009, 12:59 PM > On Tue, May 19, 2009 at 9:55 AM, Dola > Woolfe > wrote: > > > > My apologies - worked as advertised! > > > > The only thing I noticed is that it restarts the > webapp right away - and all of the webapps that depend on > the class. > > Is this comment at the top of that file not meaningful > enough??? > > > > >> in tomcat/conf/context.xml > > If you don't want all webapps affected, only apply > reloadable to the > context.xml file for that one webapp. > > And yes, it will restart the webapp as soon as it notices > the change... > > -- > Hassan Schroeder hassan.schroe...@gmail.com > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Deploy Tomcat Standalone - good idea or not?
Personally, I've just been running Tomcat standalone on port 80. --- On Tue, 5/19/09, André Warnier wrote: > From: André Warnier > Subject: Re: Deploy Tomcat Standalone - good idea or not? > To: "Tomcat Users List" > Date: Tuesday, May 19, 2009, 4:37 PM > johnrock wrote: > > I am going to be deploying a webapp on CentOS > (Spring/Hibernate/Tomcat) that > > is JSP based and has hardly any static content..I am > planning to start out > > with 1 tomcat server and 1 db server. > > > > I think that I do not need an apache front end and can > simply run tomcat > > standalone. Is this a bad idea? > > The two options I am considering are: > > 1. Have a firewall redirect traffic directly to my > tomcat server on port > > 8080 > > or > > 2. Have a firewall route traffic to an apache instance > on port 80 running on > > the same machine as tomcat server. Apache would then > function merely to > > redirect requests to tomcat on port 8080. > > > > Which is a better idea? Or are neither preferred? At > this point I do not > > want to run a third machine just for apache, but would > it cause performance > > decrease to run apache on the same machine as my main > tomcat server? Is it > > neccessary ? > > > > > Well, maybe Chris could add one column to his tests, > showing Apache + mod_jk proxying the requests to Tomcat ? > (reference to another thread, "Apache httpd vs Tomcat > static content performance [some results]" > Then we'd see how much overhead Apache + mod_jk add to the > mix. > > In any case, considering the setup you explain above, there > does not seem to be any point to have a front-end Apache, at > the contrary it can only add overhead and complexity. > But make sure to read this other thread if you have static > content, at least to choose the correct Tomcat Connector > configuration. > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: How to hot swap classes?
Hi, I added a context.xml file under WEB-INF with the following content: With that file I'm not having the desired effect. Nothing is restarting when a class file changes. --- On Tue, 5/19/09, Caldarale, Charles R wrote: > From: Caldarale, Charles R > Subject: RE: How to hot swap classes? > To: "Tomcat Users List" > Date: Tuesday, May 19, 2009, 1:38 PM > > From: Dola Woolfe [mailto:dolac...@yahoo.com] > > Subject: Re: How to hot swap classes? > > > Where do I find the context.xml for a specific > webapp? > > The author of the webapp (you) would normally create it in > the webapp's META-INF directory. > > - 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: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
favicon when serving non-html
Hi, When I serve up, say, a PDF file, how do I control the favicon? Here's my code: response.reset(); response.setContentType(IOUtilities.gMIMEType(fn)); response.setHeader("Content-disposition", "inline; filename=" + file.getName()); OutputStream outStream = response.getOutputStream(); synchronized(response.getOutputStream()){ outStream.write(IOUtilities.gFile2Bytes(file.getAbsolutePath())); } response.flushBuffer(); Thanks in advance - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: favicon when serving non-html
Thanks for the responses. When I serve up a pdf file with the code below, it shows it in an embedded acrobat, as desired. However, the icon in the browser (in the tab) is the Tomcat logo. I'd like to change it to something else. - Original Message From: Pid To: Tomcat Users List Sent: Tue, July 6, 2010 1:10:08 PM Subject: Re: favicon when serving non-html On 06/07/2010 15:10, Dola Woolfe wrote: > Hi, > > When I serve up, say, a PDF file, how do I control the favicon? > > Here's my code: > > >response.reset(); > response.setContentType(IOUtilities.gMIMEType(fn)); > response.setHeader("Content-disposition", "inline; filename=" + > file.getName()); > OutputStream outStream = response.getOutputStream(); > synchronized(response.getOutputStream()){ > outStream.write(IOUtilities.gFile2Bytes(file.getAbsolutePath())); > } > response.flushBuffer(); > > Thanks in advance If you mean "How do I specify which icon will be associated with a file that I make available for download?" You can't - the OS will always be able to override it. The best you can do is present a recognisable MIME type in the "setContentType" method call. You're using another class there, so I can't see what you're actually setting. Do you know what is sent? p P.S. please note the following: - It's "Tomcat", not "Tom Cat". - The mailing list is now "users@tomcat.apache.org" not "tomcat-u...@jakarta.apache.org". - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Tomcat 5.5 and java 1.5 features.
Hi, I'd like to use java 1.5 features in my jsp code, in particular generics. But the jasper compiler really doesn't like it. Any setting to fix this: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 2 in the jsp file: /MBInit.jsp Generated servlet error: The method name() is undefined for the type Object An error occurred at line: 2 in the jsp file: /MBInit.jsp Generated servlet error: Type mismatch: cannot convert from Object to Message An error occurred at line: 2 in the jsp file: /MBInit.jsp Generated servlet error: Type mismatch: cannot convert from Object to Vector 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:397) org.apache.jasper.compiler.Compiler.compile(Compiler.java:288) org.apache.jasper.compiler.Compiler.compile(Compiler.java:267) org.apache.jasper.compiler.Compiler.compile(Compiler.java:255) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) Many thanks in advance! Dola __ 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]
Sending a lot of info the a jsp page
Hi, This question will reveal how little I know about networking or http or something else. Basically I wrote an applet that sends data to a servlet. I do it by forming a url with a query string (GET). But this doesn't work when there's too much data. What are my options? Is it possible to use POST? Or, better yet, is it possible to send a java object by creating a socket connection with the servlet? Very many thanks in advance! Dola __ 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: Sending a lot of info the a jsp page
--- Leon Rosenberg <[EMAIL PROTECTED]> wrote: > On 1/20/06, Dola Woolfe <[EMAIL PROTECTED]> wrote: > > Hi, > > > > This question will reveal how little I know about > > networking or http or something else. > > > > Basically I wrote an applet that sends data to a > > servlet. I do it by forming a url with a query > string > > (GET). But this doesn't work when there's too much > > data. > > > > What are my options? > > Is it possible to use POST? > > Or, better yet, is it possible to send a java > object > > by creating a socket connection with the servlet? > > Creating a socket is the easiest way for you, the > only restriction is, > that you can only connect to the server the applet > came from (unless > its signed) and have to bypass proxies etc. by > yourself. And you need > of course something listening to the socket on the > other end... > > regards > Leon > Can you point to some documentation or examples? Will I be able to do this in the context of a servlet (or a jsp page) or will I have to write an altogether new beast running alongside tomcat that is listening to a socket on some other port? Thanks! __ 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: Sending a lot of info the a jsp page
--- Bill Barker <[EMAIL PROTECTED]> wrote: > > "Dola Woolfe" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > > > This question will reveal how little I know about > > networking or http or something else. > > > > Basically I wrote an applet that sends data to a > > servlet. I do it by forming a url with a query > string > > (GET). But this doesn't work when there's too much > > data. > > > > What are my options? > > Is it possible to use POST? > > Or, better yet, is it possible to send a java > object > > by creating a socket connection with the servlet? > > > > Actually, combining these two is often easiest (of > course, your java Object > must implement Serializable for this to work). > Something like (Applet > code): > > URL servlet = new URL(getDocumentBase(), > "/path/to/my/servlet"); > HttpURLConnection conn = > (HttpURLConnection)servlet.openConnection(); > conn.setDoInput(true); > conn.setDoOutput(true); > conn.setRequestMethod("POST"); > conn.setHeaderField("Content-Type", > "application/x-java"); > ObjectOutputStream out = new > ObjectOutputStream(conn.getOutputStream()); > out.writeObject(myObject); > int status = conn.getResponseCode(); > if(isOK(status)) { > InputStream in = conn.getInputStream(); > // Handle response here. > } > That's fantastic! And what does the jsp side look like? I only know how to get data through getParameter... Thanks! > > > Very many thanks in advance! > > > > Dola > > > > __ > > 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] > > __ 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]
Serving up a non-JSP file
Hi, I have a file sound.wav sitting alongside my .jsp files and when I point the browser to that file, I get the error below. This has just started happening - I don't know what I changed. Previously, it would just serve up the file. In any case, here's the error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Servlet execution threw an exception root cause java.lang.NoSuchMethodError: org.apache.naming.resources.ResourceAttributes.getCanonicalPath()Ljava/lang/String; org.apache.catalina.servlets.DefaultServlet.checkSendfile(DefaultServlet.java:1521) org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:839) org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:348) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs. __ 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]
Fairwell to JB, but having Jasper problems
Hi, After 3 years of using JBuilder, I have conclued that it is unusable. It was almost unusable in version 9, but became worse with every version. I'm back in Emacs and started learning Ant. I'm working with the standard build.xml example and the command ant -v jspc -Dtomcat.home=C:/Dola/tomcat -Dwebapp.path=C:/Dola/tomcat/webbapps/projecta causes the following error when executed from the C:\Dola\MyProject directory: C:\Dola\MyProject\build.xml:21: org.apache.jasper.JasperException: The -uriroot option must specify a pre-existing directory How do I fix it? Also, it seems that I had to add the following classpath to the script: Is that correct? Very many thanks in advance! Dola __ 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: Fairwell to JB, but having Jasper problems
--- Steve Ochani <[EMAIL PROTECTED]> wrote: > On 13 Mar 2006 at 14:25, Dola Woolfe wrote: > > > Hi, > > > > After 3 years of using JBuilder, I have conclued > that > > it is unusable. It was almost unusable in version > 9, > > but became worse with every version. > > Sorry to get offtopic a bit but > I'm curious, what problems did you have with > JBuilder that made it unusable for you? > I also hope, we do not get too far off-topic and my actual question get answered. But basically: 1. JBuilder compiles some .java classes but fails to copy them to the WEB-INF/classes directory 2. Unpredictable behavior in copying other .class dependencies to the WEB-INF/classes diectory 3. Failing to recompile necessary files 4. Unable to deal with some jdk 1.5 features in jsp files 5. Excruciatitingly slow. "Verifying web module" takes five minutes. Subsequent compilation, 10 minutes. That's for about 150 .jsp files. 6. "Tab" does not align properly. 7. Insistence on breaking up long lines. 8. Cost 9. Forget the remaining reasons. > > > > > I'm back in Emacs and started learning Ant. I'm > > Have you considered Eclipse or Netbeans? Spent one day trying to figure out Eclipse, but then got impatient. Tried Netbeans three years ago and didn't really like it. > > > > - > 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]
Ant/Jasper problems
Hi, (previous thread got sidetracked) I'm working with the standard build.xml example and the command ant -v jspc -Dtomcat.home=C:/Dola/tomcat -Dwebapp.path=C:/Dola/tomcat/webbapps/projecta causes the following error when executed from the C:\Dola\MyProject directory: C:\Dola\MyProject\build.xml:21: org.apache.jasper.JasperException: The -uriroot option must specify a pre-existing directory How do I fix it? Also, it seems that I had to add the following classpath to the script: Is that correct? Very many thanks in advance! Dola __ 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: Ant/Jasper problems
--- Filip Hanik - Dev Lists <[EMAIL PROTECTED]> wrote: > does the directory > "C:/Dola/tomcat/webbapps/projecta" exist? ie, is the > > war already exploded? > Hi, I'm a weird JSP programmer. I've been at it for 4 years but I've never used war's. I simply store my .jsp's in the afore mensioned dir and compile the .classes into the appropriate directory. So yes, exists, is full of .jsp's, has WEB-INF with a web.xml Thank you for your other suggestion. I will definitely investigate it soon. For now, I want to understand and master plain ant because it seems like a cool alternative to Makefiles. So any further advice on the error that I'm getting is greatly appreciated. Thanks! Dola > also, there is another mechanism to precompile your > JSP files, the > solution below, will compile the files just as > Tomcac would runtime, and > you will not lose the ability to recompile JSP files > post tomcat start. > huge benefit if you feel the need to patch JSP > pages, but want to gain > the benefit of precompilation. > > http://people.apache.org/~fhanik/precompile.html > > Filip > > > Dola Woolfe wrote: > > Hi, (previous thread got sidetracked) > > > > I'm working with the standard build.xml example > and > > the > > command > > ant -v jspc -Dtomcat.home=C:/Dola/tomcat > > -Dwebapp.path=C:/Dola/tomcat/webbapps/projecta > > > > causes the following error when executed from the > > C:\Dola\MyProject directory: > > > > C:\Dola\MyProject\build.xml:21: > > org.apache.jasper.JasperException: The -uriroot > option > > must specify a pre-existing directory > > > > How do I fix it? > > > > Also, it seems that I had to add the following > > classpath to the script: > > > > location="${tomcat.home}/bin/commons-logging-api.jar"/> > > > > > > > > Is that correct? > > > > Very many thanks in advance! > > > > Dola > > > > > > __ > > 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] > > > > > - > 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]
Still Jasper/Ant problem
Hi, Sorry for being persistent, but I still can't seem to compile my jsp with jasper. I'm using essentially the default build.xml and getting the following error (no idea what it means or referring to) C:\Dola\build.xml:21: org.apache.jasper.JasperException: The -uriroot option must specify a pre-existing directory Here's lines 17-22 Please help me get through this roadblock. Many thanks in advance, Dola __ 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: Still Jasper/Ant problem
--- Ryan McDonald <[EMAIL PROTECTED]> wrote: > > On 16-Mar-06, at 12:00 PM, Dola Woolfe wrote: > > > Here's lines 17-22 > > > > > validateXml="false" > > uriroot="${webapp.path}" > > > > > webXmlFragment="${webapp.path}/WEB-INF/generated_web.xml" > > > > > outputDir="${webapp.path}/WEB-INF/src" /> > > > What is the value of webapp.path seems like it > either is not being > set or is se to a location that doesn't exist. I call ant as follows: ant -v jspc -Dtomcat.home=C:/Pavel/tomcat -Dwebapp.path=C:/Dola/tomcat/webbapps/projecta > > Read the Ant documentation for specifying > parameters, using a > properties file, or edit build.xml to specify the > value of webapp.path > > > __ 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]
Best eclipse plugin for tomcat development
Hi, Following the advice of the mailing lists members, I'm trying to work with Eclipse. I've learned that to do tomcat development I need to download an appropriate plugin and that there are seveal to choose from. Can someone recommend a good one (or is there a best one, or the most common one)? Thanks! Dola __ 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]
Jsp mode in Emacs
Hi, I'm evaluating a number of different ide's for jsp approaches include Emacs + Ant. How do I make Emacs "recognize" the jsp format? If you have an answer, can you please give all the details (where to get what and to put where)? Thanks! Dola __ 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]
Help with sysdeo
Hi, Trying out the eclipse approach, and downloaded the sysdeo plugin, but can you suggest the first step to take to invoke the plug in. Not sure how to begin and can't find the howto... Thank you! Dola Chin __ 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: Fairwell to JB, but having Jasper problems
Thank you so much for coming back to this! I just fixed this and I was coming back here to report my goof. If you notice, in the command line that I used > ant -v jspc -Dtomcat.home=C:/Dola/tomcat > -Dwebapp.path=C:/Dola/tomcat/webbapps/projecta the word "webbapps" is misspelled. Now the error message makes a little more sense, but "specified directory 'quote' does not exist" would have been better! Thank you very much, Joe. Dola --- Joe Riopel <[EMAIL PROTECTED]> wrote: > Dola, > > Did you ever get this fixed ? If not, how about > pasting some of your > build file? Especially around line 21. > > On 3/13/06, Dola Woolfe <[EMAIL PROTECTED]> wrote: > > Hi, > > > > After 3 years of using JBuilder, I have conclued > that > > it is unusable. It was almost unusable in version > 9, > > but became worse with every version. > > > > I'm back in Emacs and started learning Ant. I'm > > working with the standard build.xml example and > the > > command > > ant -v jspc -Dtomcat.home=C:/Dola/tomcat > > -Dwebapp.path=C:/Dola/tomcat/webbapps/projecta > > > > causes the following error when executed from the > > C:\Dola\MyProject directory: > > > > C:\Dola\MyProject\build.xml:21: > > org.apache.jasper.JasperException: The -uriroot > option > > must specify a pre-existing directory > > > > How do I fix it? > > > > Also, it seems that I had to add the following > > classpath to the script: > > > > location="${tomcat.home}/bin/commons-logging-api.jar"/> > > > > > > > > Is that correct? > > > > Very many thanks in advance! > > > > Dola > > > > > > __ > > 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] > > > > > __ 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: Help figuring out Virtual Hosts
Hi, Getting back to this on a delay because: I just can't figure it out!!! This is probably because I'm dumb, but it's just too complicated for me. Can someone please provide an example that would illustrate how to do this? All I want is for the user to be able to enter "serverA" in his/her browser and be forwarded to "http://server/appA/index.jsp"; and the enter "serverB" and be forwarded to "http://server/appB/index.jsp";. I keep hoping that this would be as simple as it was for Apache, but apparently it is not. I'm not proud of my ignorance, but I don't know what is Engine vs. Container vs Context etc. It seems that for a semi-involved JSP project one now needs to have a JSP programmer and a Tomcat administrator. (This didn't use to be the case.) Like I mentioned, an example would be greatly appreciated. Thank you. Dola --- Jilles van Gurp <[EMAIL PROTECTED]> wrote: > You can use multiple hosttags in the server.xml, > each with their own > context. As described here > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html > > "One or more Host elements are nested inside an > Engine element. Inside > the Host element, you can nest Context elements for > the web applications > associated with this virtual host. Exactly one of > the Hosts associated > with each Engine MUST have a name matching the > defaultHost attribute of > that Engine." > > You give each application its own host and it should > work fine. You can > also use alias tags inside a host tag if you want an > application to be > available for multiple hosts. > > Jilles > > > > Dola Woolfe wrote: > > Hi, > > > > I've certainly RTFM'd and had thoroughly read > > > > > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/host.html#Host%20Name%20Aliases > > > > but I just can't figure out how to get virtual > servers > > to work. > > > > Basically, assume that DNS is set up properly and > that > > ServerA.com ServerB.com and Server.com resolve to > the > > same IP. Now, I want ServerA.com to "go to" > > Server.com/MyAppA/index.jsp and ServerB.com to "go > to" > > Server.com/MyAppB/index.jsp. This, in my mind is > sort > > of like how Apache lets you do it, where of course > it > > takes advantage of the convention of index.html > being > > the default destination. > > > > OK, how do I achieve this with Tomcat? Could > anyone > > please provide a specific example? > > > > Many thanks, > > > > Dola > > > > > > > > __ > > Yahoo! Mail - PC Magazine Editors' Choice 2005 > > http://mail.yahoo.com > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Suppress "Connection reset by peer: socket write error".
Hi Bill, Thanks for your answer and sorry for the delay in my reply! I'm using standalong Tomcat 5.5 listening on port 80. I'm using jdk 1.5 on WinXP. I'm not using any special logging. I'm running Tomcat in a console, simply by typing "startup" in tomcat/bin. What I don't want happening is for the "Connection reset by peer: socket write error" to be displayed in the console window. Given this detailed information, would you mind refining your recommendation? Thank you very much in advance, Dola Chin --- Bill Barker <[EMAIL PROTECTED]> wrote: > > "Dola Woolfe" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi, > > > > I apologize for asking this question again for I > > remembering asking this question in the past, but > I > > can't find the response. > > > > What setting (and where) will suppress the > > aforementioned exception in the tomcat log? > > > > Including the Tomcat version helps ;-). > > I'm assuming that this is for the AJP/1.3 Connector. > The answer is to > change the logging level for that component to be > one higher than the level > in the message (in the latest version, it's at DEBUG > level and I don't > remember what it used to be). For example, if you > are using JDK1.4 logging > you would do something like: > org.apache.jk.common.level=SEVERE > > in your logging.properties file. > > > Thank you very much in advance, again! > > > > Dola > > > > > > > > __ > > Yahoo! Mail - PC Magazine Editors' Choice 2005 > > http://mail.yahoo.com > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Suppress "Connection reset by peer: socket write error".
Hi Robert, What a truly fantastic answer! Very detailed and educational. Your timeis deeply appreciated. What I'd like to know is: do I have to do it in every JSP (I have hundreds). And is there a configuration solution as was alluded by Bill previously? Once again, very many thanks!!! Dola --- Robert Graf-Waczenski <[EMAIL PROTECTED]> wrote: > Hi! > > First, some background: > > The exception your app actually gets internally is a > SocketException with the text you mention below. > It occurs if the client browser prematurely cancels > an http request before tomcat has completed sending > the full response data to the client. > Another manifestation may be a SocketException with > the text "Socket closed", which *may* occur if your > app serves big download data streams and the client > cancels the download. > > The bottom line is that these two exceptions simply > happen in real life web apps and that they can be > "safely ignored". > > However, you correctly want to know how your app can > perform the magic to "safely ignore" these two > exceptions outomatically, right? > > So you will need to add some error handling that > would > basically consist of wrapping everyting in your app > inside a try/catch block that would swallow the > two variants of SocketException above. But the > problem > with this approach is that you must not simply > swallow > *all* SocketExceptions. > > Here's what we do in our app: > > catch(SocketException e) { > String stackTrace = Util.getStackTrace(e); // > this extracts the full > stack trace > if ((stackTrace.indexOf("socket write error") > -1 >|| stackTrace.indexOf("Socket closed") > -1) > && > > (stackTrace.indexOf("org.apache.tomcat.service.http.HttpResponseAdapter" > ) > -1 >|| > stackTrace.indexOf("javax.servlet.http.HttpServlet.service(") > > -1)) > { > log("Client signalled end of socket > communication"); > } > else > throw e; > } > > (Note that you may have to re-construct the full > lines > of the source code above as my mail client may have > introduced linebreaks at bad places...) > > Yes, we log an error message even if this particular > "client > aborted request" situation was detected. You may > want to swallow > this silently, but i would suggest to not do this > because you > (and we) never are sure if the stack trace analysis > above is > perfect. The other down side of this approach is > that future > versions of Java and/or Tomcat may change the > exception message > texts and/or the structure of the stack trace. But > currently > (JDK 1.5 / Tomcat 5.5) this approach does what was > intended. > > Robert > > > -Original Message- > > From: Dola Woolfe [mailto:[EMAIL PROTECTED] > > Sent: Friday, October 14, 2005 3:17 AM > > To: Tomcat Users List > > Subject: Re: Suppress "Connection reset by peer: > socket write error". > > > > > > Hi Bill, > > > > Thanks for your answer and sorry for the delay in > my > > reply! > > > > I'm using standalong Tomcat 5.5 listening on port > 80. > > I'm using jdk 1.5 on WinXP. I'm not using any > special > > logging. I'm running Tomcat in a console, simply > by > > typing "startup" in tomcat/bin. > > > > What I don't want happening is for the "Connection > > reset by peer: socket write error" to be displayed > in > > the console window. > > > > Given this detailed information, would you mind > > refining your recommendation? > > > > Thank you very much in advance, > > > > Dola Chin > > > > > > > > --- Bill Barker <[EMAIL PROTECTED]> wrote: > > > > > > > > "Dola Woolfe" <[EMAIL PROTECTED]> wrote in > message > > > > > > news:[EMAIL PROTECTED] > > > > Hi, > > > > > > > > I apologize for asking this question again for > I > > > > remembering asking this question in the past, > but > > > I > > > > can't find the response. > > > > > > > > What setting (and where) will suppress the > > > > aforementioned exception in the tomcat log? > > > > > > > > > > Including the Tomcat version helps ;-). > > > > > > I'm assuming that this is for the AJP/1.3 > Connecto
RE: Suppress "Connection reset by peer: socket write error".
Hi Robert, Thank you so much. I'm, in principle, quite open to this solution. But before I do this, I would like to make sure that there's no configuation route that will solve this problem. So please if anyone has an opposite opinion, please speak up. Also, how come the page is not forwarded to ErrorPage.jsp? Thanks Pavel --- Robert Graf-Waczenski <[EMAIL PROTECTED]> wrote: > Hi Dola, > > right off of my head, i can't come up with a smart > configuration > solution that would selectively swallow the message > as our approach > does. Our app has two shared JSPs that are included > in every JSP, one at > the top and one at the bottom. The top-included JSP > opens the try block > (making it illegal for many IDEs such as IntelliJ or > similar), the > bottom-included JSP contains the catch block with > the handling code. > (Actually, our approach differs slightly from what i > described to you: > Our top/bottom JSPs take care of logging everything > to a central logger > class and the logger class, in turn, inspects the > stack trace and avoids > to perform a critical logging if the stack trace > looks as i described > it.) > > But, yes, if your hundreds of JSPs do not have two > such globally shared > include JSPs, then you are in some trouble and have > to introduce the two > include statements, one at the top and the other at > the bottom. (You may > want to use smart shell scripting for this...) Then, > add your two > top/bottom JSPs and you are done with your JSPs. > > And don't forget your servlet classes: If any of > your web requests are > served by a servlet, you have to add the try/catch > block to the servlet > class, too. > > Robert > > > -Original Message- > > From: Dola Woolfe [mailto:[EMAIL PROTECTED] > > Sent: Friday, October 14, 2005 8:43 AM > > To: Tomcat Users List > > Subject: RE: Suppress "Connection reset by peer: > socket write error". > > > > > > Hi Robert, > > > > What a truly fantastic answer! Very detailed and > > educational. Your timeis deeply appreciated. > > > > What I'd like to know is: do I have to do it in > every > > JSP (I have hundreds). And is there a > configuration > > solution as was alluded by Bill previously? > > > > Once again, very many thanks!!! > > > > Dola > > > > --- Robert Graf-Waczenski <[EMAIL PROTECTED]> wrote: > > > > > Hi! > > > > > > First, some background: > > > > > > The exception your app actually gets internally > is a > > > SocketException with the text you mention below. > > > It occurs if the client browser prematurely > cancels > > > an http request before tomcat has completed > sending > > > the full response data to the client. > > > Another manifestation may be a SocketException > with > > > the text "Socket closed", which *may* occur if > your > > > app serves big download data streams and the > client > > > cancels the download. > > > > > > The bottom line is that these two exceptions > simply > > > happen in real life web apps and that they can > be > > > "safely ignored". > > > > > > However, you correctly want to know how your app > can > > > perform the magic to "safely ignore" these two > > > exceptions outomatically, right? > > > > > > So you will need to add some error handling that > > > would > > > basically consist of wrapping everyting in your > app > > > inside a try/catch block that would swallow the > > > two variants of SocketException above. But the > > > problem > > > with this approach is that you must not simply > > > swallow > > > *all* SocketExceptions. > > > > > > Here's what we do in our app: > > > > > > catch(SocketException e) { > > > String stackTrace = Util.getStackTrace(e); // > > > this extracts the full > > > stack trace > > > if ((stackTrace.indexOf("socket write error") > > -1 > > >|| stackTrace.indexOf("Socket closed") > > -1) > > > && > > > > > > > > > (stackTrace.indexOf("org.apache.tomcat.service.http.HttpRespon > > seAdapter" > > > ) > -1 > > >|| > > > > > > stackTrace.indexOf("javax.servlet.http.HttpServlet.service(") > > > > -1)) > > > { > > > log(
Annoying JBuilder copying problem
Hi, Those (very few) of you who use JBuilder for Tomcat development know that JB insists on copying .class files into the WEB-INF/classes directory for you. Ordinarily, this is ok, but with the new version of JBuilder (2006), in one of the diectories it decides to copy 67 out of 78 files. 1. Has anyone experienced this problem and know a workaround? 2. Is there a way to prevent JB from copying .class files into the WEB-INF directory? Thanks! Dola Chin __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Annoying JBuilder copying problem
--- Mark Sutton <[EMAIL PROTECTED]> wrote: > I used JBuilder on a previous job and I seem to > recall that it had the > habit of trying to be clever and only copying over > classes that were > directly referenced by other classes. > Unfortunately, this didn't seem > to include stuff that was only referenced in JSP > pages. Could this be > causing the problem? ! Yes, I think that is the problem!!! ! I would be very happy to see a resolution! > > I am afraid I can't recall what the resolution was. > I'll try to find out. > > Mark > > On 04/11/05, Rhino <[EMAIL PROTECTED]> wrote: > > I used JBuilder(6) on a project for a few months > back in 2002. As I recall, > > they had a fairly active set of private newsgroups > with some very helpful > > people on them. Maybe that would be a better place > to ask your question? > > > > I'm not saying that the Tomcat mailing list is > inappropriate, just that you > > might get better answers on the JBuilder > newsgroups. > > > > By the way, I was going to post a link to those > newsgroups for you but I > > can't remember anything about how I found them. I > think they had their own > > private news server and that you could access it > for free without having to > > buy the product but I can't recall how to > subscribe to the newsgroups. If > > you check their website, you should be able to > find that information easily > > enough. > > > > Rhino > > > > - Original Message - > > From: "Dola Woolfe" <[EMAIL PROTECTED]> > > To: "Tom Cat" > > Sent: Friday, November 04, 2005 12:06 PM > > Subject: Annoying JBuilder copying problem > > > > > > > Hi, > > > > > > Those (very few) of you who use JBuilder for > Tomcat > > > development know that JB insists on copying > .class > > > files into the WEB-INF/classes directory for > you. > > > Ordinarily, this is ok, but with the new version > of > > > JBuilder (2006), in one of the diectories it > decides > > > to copy 67 out of 78 files. > > > > > > 1. Has anyone experienced this problem and know > a > > > workaround? > > > 2. Is there a way to prevent JB from copying > .class > > > files into the WEB-INF directory? > > > > > > Thanks! > > > > > > Dola Chin > > > > > > > > > > > > __ > > > Yahoo! FareChase: Search multiple travel sites > in one click. > > > http://farechase.yahoo.com > > > > > > > - > > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > > > -- > > > No virus found in this incoming message. > > > Checked by AVG Free Edition. > > > Version: 7.1.362 / Virus Database: 267.12.8/161 > - Release Date: 03/11/2005 > > > > > > > > > > > > > > -- > > No virus found in this outgoing message. > > Checked by AVG Free Edition. > > Version: 7.1.362 / Virus Database: 267.12.8/161 - > Release Date: 03/11/2005 > > > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is this good flow control?
Hi, I'm adding a level of security to my web applicaiton. Certain pages are only available to certain users. So the page first checks wither the user is authorized to view it. If yes, it displays the page. Otherwise it offers to login. I don't want to do this with a (short) "if" and a (long) "then" so I throw a MyAuthenticationException and in ErrorPage.jsp have code: if (exception instanceof MyAuthenticationException) forward-to-login-page. (This saves me from having a big "then" block on every page.) Is it a good idea to handle flow this way? Thanks! Dola __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can a "return" statement cause a problem?
Hi, In one of my JSP pages (ErrorPage.jsp) I have the following code. <% if (display-nothing-only-forward) { out.println(""); // return; } //Lot's more code %> It works, but prints out unnecessary html before it forwards. But if I uncomment "return" it stops working. I get HTTP 500 - Internal server error What could that be? In the tomcat console window, I get no indication that something is not right. Thanks! Dola Chin __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can a "return" statement cause a problem?
--- Bob Bateman <[EMAIL PROTECTED]> wrote: > On Fri, 4 Nov 2005 11:14:19 -0800 (PST) > Dola Woolfe <[EMAIL PROTECTED]> wrote: > > Hi, > > > > In one of my JSP pages (ErrorPage.jsp) I have the > > following code. > > > > <% > > if (display-nothing-only-forward) { > > out.println(" 0 > > seconds>"); > > // return; > > } > > > > //Lot's more code > > %> > > > > It works, but prints out unnecessary html before > it > > forwards. But if I uncomment "return" it stops > > working. I get > > HTTP 500 - Internal server error > > > > What could that be? In the tomcat console window, > I > > get no indication that something is not right. > > I would postulate that you are executing unnecessary > code. > > *Disclaimer: The following is NOT compliant with MVC > best > practices... > > In your JSP page, you *probably* want your "if > (display-nothing-only-forward)" statement to execute > if > there is nothing to do. If that is true, then after > your > closing brace with the META info in it, you probably > want > to use an 'else' clause and enclose the rest of your > code > in a set of braces. > > In effect, what you've done is to tell the system to > put > the META statement out ONLY when there is nothing > else to > do - but the rest of your code runs all the time. > > If you have sufficient experience, I would suggest > removing all of the java code from your JSP page and > > putting the code into a Tag. Tags are really easy > to use > and keep your business logic seperate from your JSP > presentation. Of course, you'll still have to > generate > HTML in the Tag, but that's partly what tags are > for. > > Bob > Hi Bob, I have not used Tags and plan to take a look at them soon. Concerning the rest of your suggestion, having a big "else" clause is precisely something I'm trying to avoid. I always prefer if (short_clause) { //... return; } //rest of code to if (short_clause) { //... return; } else { //rest of code } Also, what I'm curious about is this; what I do may not be a good coding practice, but what is causing the error? Thanks! Dola > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can a "return" statement cause a problem?
--- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote: > It might be interesting to look at the class file > generated from your > JSP... many times things like this become fairly > obvious when you see the > code that is actually being executed. Here's the entire generated file and the troubling "return" is surrounded surrounded by forward slashes. Thanks! __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can a "return" statement cause a problem?
Sorry, forgot to paste. package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import html.*; public final class ErrorPage_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent { private static java.util.Vector _jspx_dependants; public java.util.List getDependants() { return _jspx_dependants; } public void _jspService(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException, ServletException { JspFactory _jspxFactory = null; PageContext pageContext = null; HttpSession session = null; Throwable exception = org.apache.jasper.runtime.JspRuntimeLibrary.getThrowable(request); if (exception != null) { response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page = this; JspWriter _jspx_out = null; PageContext _jspx_page_context = null; try { _jspxFactory = JspFactory.getDefaultFactory(); response.setContentType("text/html"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write('\r'); out.write('\n'); String offendingPage = request.getAttribute("javax.servlet.error.request_uri") + "?" + request.getQueryString(); try { if (exception instanceof servlets.Authentication.Exception) { System.out.println("I'm here"); out.println("" + new Forward("/applicaitona/LoginForm.jsp?Forward=" + offendingPage.replaceAll("&", "AMERSAND"), 0) + ""); return; } else { String uri = (String) request.getAttribute("request_uri"); String url = "http://projectc"; + request.getAttribute("javax.servlet.error.request_uri") + "?" + request.getQueryString(); String body = "The error occurred when viewing the following page:\n" + url + "\n\nMy Comments:\n "; body = body.replaceAll("&", "%26").replaceAll(" ", " ").replaceAll("%", "%25").replaceAll("\n", "%0D%0A"); // //body = java.net.URLEncoder.encode(body); Table table = new Table() .pAddH("Date").pAddL(new java.util.Date()).pLN() .pAddH("Info").pAddL("An error has occurred, but now we capture errors gracefully. If you belive that this is a Project A error, please " + new Anchor("mailto:[EMAIL PROTECTED] A Problem&Body=" + body, "ALERT PG by emailing him") + ".").pLN() .pAddH("Possible Resolution") .pAddL("For what it's worth, I'm passing to you the name of the error produced by java, " + "which may give you some indication of what was wrong: " + new Text.Bold(exception)).pLN() .pAddH("What to do next") .pAddL("Visit the " + new Anchor("/applicaitona/TroubleShooting.jsp", "Troubleshooting") + "page to find out whether this is a common problem.").pLN() .pAddH("Emergency").pAddL("If this is an emergency contact PG at (917) 699 5105").pLN() ; table.pAddH("The following sectionis intended for PG").pSetSpan(1, 2).pLN(); StackTraceElement[] ste = exception.getStackTrace(); for (int i = 0; i < ste.length; i++) { String className = ste[i].getClassName(); if (className.startsWith("database") || className.startsWith("contrib") || className.startsWith("html") || className.startsWith("servlets") || className.startsWith("universe")) { String fileName = ste[i].getFileName(); int n = ste[i].getLineNumber(); String name = "C:/User/ProjectA/src/" + className.substring(0, className.lastIndexOf('.')).replace('.', '/')+ "/" + ste[i].getFileName(); Anchor emacsAnchor = new Anchor(name, fileName); Anchor htmlAnchor = new Anchor("UtilTextFileInATable.jsp?FileName=" + name.replaceAll("/", "") + "&Highlight=" + n, "(HTML View)"); table.pAddH("" + i).pAddL(emacsAnchor + ", line " + n + " " + htmlAnchor).pLN(); } else if (className.endsWith("_jsp")) { String fileName = ste[i].getFileName(); fileName = fileName.substring(fileName.lastIndexOf('.') + 1) + ".java"; int n = ste[i].getLineNumber(); // String name = "C:/User/tomcat/work/DEFAULT/applicaitona/" + fileName; String name = "C:/User/tomcat/work/Catalina/localhost/applicaitona/org/apache/jsp/" + fileName; Anchor emacsAnchor = new Anchor(name, fileName); Anchor htmlAnchor = new Anchor("UtilTextFileInATable.jsp?FileName=" + name.
Re: Can a "return" statement cause a problem?
> >What could that be? In the tomcat console window, I > >get no indication that something is not right. > > > > > > > > First you still should be presenting a well formed > HTML page to the > browser. I think I'm correcting in stating that > should > exiting inside , but you still should emit > . Well, actually I gett the same error (500) when I use wget instead of a browser, so it's not HTML (although I agree that HTML ought to be proper). I like your suggestions that follow, but at this point I'm also wondering where I could find some kind of an error message to see what goes wrong. I know that the return statement is reached and once my JSP has no control, I don't know how to monitor what happens next! Thanks, Dola > > Second are you sure you want to do your HTTP > redirect like this ? > Conceptually by the time you are rendering a JSP > page your that Servlet > has made a decision that this JSP page (and > therefore this View) is the > correct one the user should see. I am presuming > that you might not have > any customer Servlet infront of this JSP page and > are using the > defaultServlet to get there. Maybe its worth you > creating a Servlet and > moving the Java Code logic into that. Then doing a > "forward" to the JSP > page you wish to render, or setup a HTTP redirect to > force the browser > to goto another URL. > > My thoughts. > > I'm not sure if return is right or wrong here from a > specification > standpoint. > > -- > Darryl L. Miles > > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Capturing System.out on a Mac
Hi, We just switched from Windows to Mac. On Windows, when we started tomcat in the command window, a new window would pop up that contains all the output of System.out. But on a Mac, no new window shows up and we are missing all the output. Is there a quick fix to this? Many thanks in advance, Dola - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Capturing System.out on a Mac
They don't contain the output of System.out? Are you expecting them to?
Re: Capturing System.out on a Mac
Thank you and Christopher! I appreciate the point about logging, but what if I am using a library that utilizes System.out? Thanks again, Dola - Original Message - From: Derek Beauregard To: Tomcat Users List Cc: Sent: Friday, April 27, 2012 1:31 PM Subject: Re: Capturing System.out on a Mac Catalina.out should have anything written to stdout/stderr. Be careful as this file is not rotated and will grow for ever. Any web apps should be using logging and not System.out. Also you could start tomcat with the 'run' command rather than the 'start' command to run it in the foreground of your current shell. (I wouldn't do this in production) -Derek Derek Beauregard - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org