RE: Changing to different index.jsp from Tomcat default index.jsp
I thought it was created in a Servlet and you had to change some parameters in one of the .xml files like web.xml in the ROOT directory. Is this correct for Apache Tomcat 5.5.17? -Original Message- From: Lou Caudell [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 16, 2006 3:12 PM To: Tomcat Users List Subject: Re: Changing to different index.jsp from Tomcat default index.jsp McRaven, Brian wrote: When I start my Tomcat server and link to http://localhost/ I get the default index.jsp that comes with Apache Tomcat Server. I want to use my own index.jsp how do I achieve this objective? Brian It's under webapps/ROOT. But, rename the original one, as it is useful. - Lou Caudell - 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]
RE: Install on XP Home edition
This is where I believe my mistake is. I installed Java on my home computer in response and now I'm working on getting the JAVA_HOME variable set. I thought I created the correct JAVA_HOME environment variable but I found out I was creating it in the top user box and not in the bottom system box. The system box is where my JAVA_HOME environment variable resides on my work computer which has the server installed correctly. I'm also trying to determine if my PATH environment variable needs to include the path of my JDK directory. On my work computer the JDK directory is not indicated. However I have gotten instruction that this PATH variable needs to be set. So it seems to work without it but I'm no expert. This might be the cause of another problem I'm trying to get around. If you know for certain that this needs to be added to the PATH variable could someone confirm that it is the system PATH variable that I need to add the directory to. Brian -Original Message- From: Htin Kyaw Nyo [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 02, 2006 1:10 PM To: Tomcat Users List Subject: Re: Install on XP Home edition Seems like JAVA_HOME has not been defined or wrong java version. check tomcat/logs/catalina.out On 8/2/06, Lou Caudell [EMAIL PROTECTED] wrote: McRaven, Brian wrote: I installed Tomcat 5.5.17 on my home computer so that I can test my project when I'm away from work. After completing the steps from a website (www.codeservlets.com) I try the startup.bat file in the bin directory. The program runs for a very short time and quits before I can read the one and only line that is written in the DOS screen. Does anyone know what could be wrong here. Does the fact that I installed the program on a Home Edition of XP mean that it won't work. I know I can't get IIS installed on a Home Edition of XP. Brian McRaven Might not be a bad idea to disable the firewall, while your configuring. - Lou Caudell - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Computers are useless, they can only give answers. /Pablo Picasso. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Install on XP Home edition
I installed Tomcat 5.5.17 on my home computer so that I can test my project when I'm away from work. After completing the steps from a website (www.codeservlets.com) I try the startup.bat file in the bin directory. The program runs for a very short time and quits before I can read the one and only line that is written in the DOS screen. Does anyone know what could be wrong here. Does the fact that I installed the program on a Home Edition of XP mean that it won't work. I know I can't get IIS installed on a Home Edition of XP. Brian McRaven
RE: Accessing a servlet
I made the servlet part of a package but I'm getting a Servlet not Found Exception. The actions I took to make the servlet part of a package are the following: 1 added package line to java code, recompiled 2 placed new class file in new subdirectory of WEB-INF/classes folder with same name of package 3 changed entry in web.xml file to reflect package that servlet is in for the url-pattern 4 changed JSP so that the forms action=firstpack.JustALittleTest I've looked at the log files but I'm not sure what to look for. Brian -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 7:49 AM To: Tomcat Users List Subject: Re: Accessing a servlet I would check in tomcat logs directory for reasons why the servlet is not available. One reason could be that classes should be in a package: http://tomcat.apache.org/faq/classnotfound.html HTH, Jon McRaven, Brian wrote: OK I did that and now my system is hanging which I guess could be an error in my code or something with the server. I think it is my code so I'll look that over. Thanks for your help. Sorry for the confusion. Brian -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 11, 2006 2:48 PM To: Tomcat Users List Subject: Re: Accessing a servlet Did you reload the webapp after making the change? All changes to WEB-INF/web.xml or files in WEB-INF/classes and WEB-INF/lib will require a reload before they become active in tomcat. --David McRaven, Brian wrote: I was able to refer to a book I have and so I dropped the .class extensions altogether. I get an error that requested resource is not available still. Any suggestions on this? My web.xml file has this entry: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustAlittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/JustALittleTest/url-pattern /servlet-mapping And my action attribute=JustALittleTest. Brian -Original Message- From: McRaven, Brian Sent: Tuesday, July 11, 2006 1:14 PM To: users@tomcat.apache.org Subject: Accessing a servlet Well I'm ticking these newbie questions off. I have a simple servlet that I want my form to access. I compiled the file fine and it is called JustALittleTest.class. I placed this file in the ROOT/WEB-INF/classes folder. In my JSP I have a form with some submit buttons. The action element of the form is set to =JustALittleTest. I changed my web.xml file so it now has the following entries: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustAlittleTest.class/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/JustALittleTest.class/url-pattern /servlet-mapping I've tried a few changes to the above entries but I haven't gotten it right yet. Should the servlet-class value have a .class extension? Is my url pattern accessing the correct folder? Brian - 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]
RE: Accessing a servlet
When I use this entry I get a request resource not found error. servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack/JustALittleTest/url-pattern /servlet-mapping Under the previous error to this one I was using an entry of: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack.JustALittleTest/url-pattern /servlet-mapping With the following entry: servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack.JustALittleTest/url-pattern /servlet-mapping I get an error of 'Error allocating a servlet instance' Brian -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 9:46 AM To: Tomcat Users List Subject: Re: Accessing a servlet servlet servlet-nameTheServletName/servlet-name servlet-classpackage.ThisIsTheClassName/servlet-class /servlet servlet-mapping servlet-nameTheServletName/servlet-name url-pattern/a/path/to/theservlet/url-pattern /servlet-mapping servlet-name is used to link the definition to the mapping. defs are grouped together in web.xml, as are mappings. url-pattern refers to the path by which you'll access the servlet. it can any unique url on your system, and does not have to reflect the class name. McRaven, Brian wrote: I made the servlet part of a package but I'm getting a Servlet not Found Exception. The actions I took to make the servlet part of a package are the following: 1 added package line to java code, recompiled 2 placed new class file in new subdirectory of WEB-INF/classes folder with same name of package 3 changed entry in web.xml file to reflect package that servlet is in for the url-pattern 4 changed JSP so that the forms action=firstpack.JustALittleTest I've looked at the log files but I'm not sure what to look for. Brian -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 7:49 AM To: Tomcat Users List Subject: Re: Accessing a servlet I would check in tomcat logs directory for reasons why the servlet is not available. One reason could be that classes should be in a package: http://tomcat.apache.org/faq/classnotfound.html HTH, Jon McRaven, Brian wrote: OK I did that and now my system is hanging which I guess could be an error in my code or something with the server. I think it is my code so I'll look that over. Thanks for your help. Sorry for the confusion. Brian -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 11, 2006 2:48 PM To: Tomcat Users List Subject: Re: Accessing a servlet Did you reload the webapp after making the change? All changes to WEB-INF/web.xml or files in WEB-INF/classes and WEB-INF/lib will require a reload before they become active in tomcat. --David McRaven, Brian wrote: I was able to refer to a book I have and so I dropped the .class extensions altogether. I get an error that requested resource is not available still. Any suggestions on this? My web.xml file has this entry: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustAlittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/JustALittleTest/url-pattern /servlet-mapping And my action attribute=JustALittleTest. Brian -Original Message- From: McRaven, Brian Sent: Tuesday, July 11, 2006 1:14 PM To: users@tomcat.apache.org Subject: Accessing a servlet Well I'm ticking these newbie questions off. I have a simple servlet that I want my form to access. I compiled the file fine and it is called JustALittleTest.class. I placed this file in the ROOT/WEB-INF/classes folder. In my JSP I have a form with some submit buttons. The action element of the form is set to =JustALittleTest. I changed my web.xml file so it now has the following entries: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustAlittleTest.class/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/JustALittleTest.class/url-pattern /servlet-mapping I've tried a few changes to the above entries but I haven't gotten it right yet. Should the servlet-class value have a .class extension? Is my url pattern accessing the correct folder? Brian - To start a new topic
RE: Accessing a servlet
If the url-pattern should be /firstpack/JustALittleTest then should the form on the JSP refer to action=firstpack.JustALittleTest or action=firstpack/JustALittleTest ? Brian -Original Message- From: McRaven, Brian Sent: Wednesday, July 12, 2006 9:55 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Accessing a servlet When I use this entry I get a request resource not found error. servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack/JustALittleTest/url-pattern /servlet-mapping Under the previous error to this one I was using an entry of: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack.JustALittleTest/url-pattern /servlet-mapping With the following entry: servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack.JustALittleTest/url-pattern /servlet-mapping I get an error of 'Error allocating a servlet instance' Brian -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 9:46 AM To: Tomcat Users List Subject: Re: Accessing a servlet servlet servlet-nameTheServletName/servlet-name servlet-classpackage.ThisIsTheClassName/servlet-class /servlet servlet-mapping servlet-nameTheServletName/servlet-name url-pattern/a/path/to/theservlet/url-pattern /servlet-mapping servlet-name is used to link the definition to the mapping. defs are grouped together in web.xml, as are mappings. url-pattern refers to the path by which you'll access the servlet. it can any unique url on your system, and does not have to reflect the class name. McRaven, Brian wrote: I made the servlet part of a package but I'm getting a Servlet not Found Exception. The actions I took to make the servlet part of a package are the following: 1 added package line to java code, recompiled 2 placed new class file in new subdirectory of WEB-INF/classes folder with same name of package 3 changed entry in web.xml file to reflect package that servlet is in for the url-pattern 4 changed JSP so that the forms action=firstpack.JustALittleTest I've looked at the log files but I'm not sure what to look for. Brian -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 7:49 AM To: Tomcat Users List Subject: Re: Accessing a servlet I would check in tomcat logs directory for reasons why the servlet is not available. One reason could be that classes should be in a package: http://tomcat.apache.org/faq/classnotfound.html HTH, Jon McRaven, Brian wrote: OK I did that and now my system is hanging which I guess could be an error in my code or something with the server. I think it is my code so I'll look that over. Thanks for your help. Sorry for the confusion. Brian -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 11, 2006 2:48 PM To: Tomcat Users List Subject: Re: Accessing a servlet Did you reload the webapp after making the change? All changes to WEB-INF/web.xml or files in WEB-INF/classes and WEB-INF/lib will require a reload before they become active in tomcat. --David McRaven, Brian wrote: I was able to refer to a book I have and so I dropped the .class extensions altogether. I get an error that requested resource is not available still. Any suggestions on this? My web.xml file has this entry: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustAlittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/JustALittleTest/url-pattern /servlet-mapping And my action attribute=JustALittleTest. Brian -Original Message- From: McRaven, Brian Sent: Tuesday, July 11, 2006 1:14 PM To: users@tomcat.apache.org Subject: Accessing a servlet Well I'm ticking these newbie questions off. I have a simple servlet that I want my form to access. I compiled the file fine and it is called JustALittleTest.class. I placed this file in the ROOT/WEB-INF/classes folder. In my JSP I have a form with some submit buttons. The action element of the form is set to =JustALittleTest. I changed my web.xml file so it now has the following entries: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustAlittleTest.class/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern
RE: Accessing a servlet
OK so now I have this: action=JustALittleTest/firstpack/JustALittleTest For a web.xml of file of: servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack/JustALittleTest/url-pattern /servlet-mapping And I get requested resource not found. Brian -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 11:05 AM To: Tomcat Users List Subject: Re: Accessing a servlet check your ./WEB-INF/web.xml servlet servlet-nameFooServlet/servlet-name servlet-classFooServlet/servlet-class /servlet servlet-mapping servlet-nameFooServlet/servlet-name url-pattern/servlet/Foo/url-pattern /servlet-mapping reference to invoke is ServletServletNameFromWeb.xml/Url-patternFromActionMapping e.g. FooServlet/servlet/Foo Martin-- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: McRaven, Brian [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, July 12, 2006 10:43 AM Subject: RE: Accessing a servlet If the url-pattern should be /firstpack/JustALittleTest then should the form on the JSP refer to action=firstpack.JustALittleTest or action=firstpack/JustALittleTest ? Brian -Original Message- From: McRaven, Brian Sent: Wednesday, July 12, 2006 9:55 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Accessing a servlet When I use this entry I get a request resource not found error. servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack/JustALittleTest/url-pattern /servlet-mapping Under the previous error to this one I was using an entry of: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack.JustALittleTest/url-pattern /servlet-mapping With the following entry: servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack.JustALittleTest/url-pattern /servlet-mapping I get an error of 'Error allocating a servlet instance' Brian -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 9:46 AM To: Tomcat Users List Subject: Re: Accessing a servlet servlet servlet-nameTheServletName/servlet-name servlet-classpackage.ThisIsTheClassName/servlet-class /servlet servlet-mapping servlet-nameTheServletName/servlet-name url-pattern/a/path/to/theservlet/url-pattern /servlet-mapping servlet-name is used to link the definition to the mapping. defs are grouped together in web.xml, as are mappings. url-pattern refers to the path by which you'll access the servlet. it can any unique url on your system, and does not have to reflect the class name. McRaven, Brian wrote: I made the servlet part of a package but I'm getting a Servlet not Found Exception. The actions I took to make the servlet part of a package are the following: 1 added package line to java code, recompiled 2 placed new class file in new subdirectory of WEB-INF/classes folder with same name of package 3 changed entry in web.xml file to reflect package that servlet is in for the url-pattern 4 changed JSP so that the forms action=firstpack.JustALittleTest I've looked at the log files but I'm not sure what to look for. Brian -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 7:49 AM To: Tomcat Users List Subject: Re: Accessing a servlet I would check in tomcat logs directory for reasons why the servlet is not available. One reason could be that classes should be in a package: http://tomcat.apache.org/faq/classnotfound.html HTH, Jon McRaven, Brian wrote: OK I did that and now my system is hanging which I guess could be an error in my code or something with the server. I think it is my code so I'll look that over. Thanks for your help. Sorry for the confusion. Brian -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 11, 2006 2:48 PM To: Tomcat Users List Subject: Re
RE: Accessing a servlet
Yes, the forms are in the ROOT webapp. The firstpack is in the ROOT/WEB-INF/classes folder. Where should the firstpack go? Brian -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 11:30 AM To: Tomcat Users List Subject: Re: Accessing a servlet You've deployed this in the ROOT webapp? form action should be /firstpack/JustALittleTest McRaven, Brian wrote: OK so now I have this: action=JustALittleTest/firstpack/JustALittleTest For a web.xml of file of: servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack/JustALittleTest/url-pattern /servlet-mapping And I get requested resource not found. Brian -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 11:05 AM To: Tomcat Users List Subject: Re: Accessing a servlet check your ./WEB-INF/web.xml servlet servlet-nameFooServlet/servlet-name servlet-classFooServlet/servlet-class /servlet servlet-mapping servlet-nameFooServlet/servlet-name url-pattern/servlet/Foo/url-pattern /servlet-mapping reference to invoke is ServletServletNameFromWeb.xml/Url-patternFromActionMapping e.g. FooServlet/servlet/Foo Martin-- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: McRaven, Brian [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, July 12, 2006 10:43 AM Subject: RE: Accessing a servlet If the url-pattern should be /firstpack/JustALittleTest then should the form on the JSP refer to action=firstpack.JustALittleTest or action=firstpack/JustALittleTest ? Brian -Original Message- From: McRaven, Brian Sent: Wednesday, July 12, 2006 9:55 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Accessing a servlet When I use this entry I get a request resource not found error. servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack/JustALittleTest/url-pattern /servlet-mapping Under the previous error to this one I was using an entry of: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack.JustALittleTest/url-pattern /servlet-mapping With the following entry: servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack.JustALittleTest/url-pattern /servlet-mapping I get an error of 'Error allocating a servlet instance' Brian -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 9:46 AM To: Tomcat Users List Subject: Re: Accessing a servlet servlet servlet-nameTheServletName/servlet-name servlet-classpackage.ThisIsTheClassName/servlet-class /servlet servlet-mapping servlet-nameTheServletName/servlet-name url-pattern/a/path/to/theservlet/url-pattern /servlet-mapping servlet-name is used to link the definition to the mapping. defs are grouped together in web.xml, as are mappings. url-pattern refers to the path by which you'll access the servlet. it can any unique url on your system, and does not have to reflect the class name. McRaven, Brian wrote: I made the servlet part of a package but I'm getting a Servlet not Found Exception. The actions I took to make the servlet part of a package are the following: 1 added package line to java code, recompiled 2 placed new class file in new subdirectory of WEB-INF/classes folder with same name of package 3 changed entry in web.xml file to reflect package that servlet is in for the url-pattern 4 changed JSP so that the forms action=firstpack.JustALittleTest I've looked at the log files but I'm not sure what to look for. Brian -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 7:49 AM To: Tomcat Users List Subject: Re: Accessing a servlet I would check in tomcat logs directory for reasons why
RE: Accessing a servlet
I check out on all of that. I'm not sure if this is important but when I build the servlet there is an error that I get. It underlines my package and says that the package name was not one that it expected. It's not a warning its an error. I still get a class file out of the process. Does this sound like I need to develop the servlet in the firstpack folder? Brian -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 12:59 PM To: Tomcat Users List Subject: Re: Accessing a servlet ROOT/WEB-INF/classes/firstpack/JustALittleTest.class and JustALittleTest.java should have a package declaration of firstpack prior to compilation. McRaven, Brian wrote: Yes, the forms are in the ROOT webapp. The firstpack is in the ROOT/WEB-INF/classes folder. Where should the firstpack go? Brian -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 11:30 AM To: Tomcat Users List Subject: Re: Accessing a servlet You've deployed this in the ROOT webapp? form action should be /firstpack/JustALittleTest McRaven, Brian wrote: OK so now I have this: action=JustALittleTest/firstpack/JustALittleTest For a web.xml of file of: servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack/JustALittleTest/url-pattern /servlet-mapping And I get requested resource not found. Brian -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 11:05 AM To: Tomcat Users List Subject: Re: Accessing a servlet check your ./WEB-INF/web.xml servlet servlet-nameFooServlet/servlet-name servlet-classFooServlet/servlet-class /servlet servlet-mapping servlet-nameFooServlet/servlet-name url-pattern/servlet/Foo/url-pattern /servlet-mapping reference to invoke is ServletServletNameFromWeb.xml/Url-patternFromActionMapping e.g. FooServlet/servlet/Foo Martin-- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: McRaven, Brian [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Sent: Wednesday, July 12, 2006 10:43 AM Subject: RE: Accessing a servlet If the url-pattern should be /firstpack/JustALittleTest then should the form on the JSP refer to action=firstpack.JustALittleTest or action=firstpack/JustALittleTest ? Brian -Original Message- From: McRaven, Brian Sent: Wednesday, July 12, 2006 9:55 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Accessing a servlet When I use this entry I get a request resource not found error. servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack/JustALittleTest/url-pattern /servlet-mapping Under the previous error to this one I was using an entry of: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack.JustALittleTest/url-pattern /servlet-mapping With the following entry: servlet servlet-nameJustALittleTest/servlet-name servlet-classfirstpack.JustALittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/firstpack.JustALittleTest/url-pattern /servlet-mapping I get an error of 'Error allocating a servlet instance' Brian -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 9:46 AM To: Tomcat Users List Subject: Re: Accessing a servlet servlet servlet-nameTheServletName/servlet-name servlet-classpackage.ThisIsTheClassName/servlet-class /servlet servlet-mapping servlet-nameTheServletName/servlet-name url-pattern/a/path/to/theservlet/url-pattern /servlet-mapping servlet-name is used to link the definition to the mapping. defs are grouped together in web.xml, as are mappings. url-pattern refers to the path by which you'll access the servlet. it can any unique url on your system, and does not have to reflect the class name. McRaven, Brian wrote: I made the servlet part of a package but I'm getting a Servlet not Found
RE: Accessing a servlet
I appreciate everyone's help here. I've been double checking my syntax. I created a new project with the old code with a package inserted into the project. My servlet now delivers a blank screen when it should redirect me to one of my other jsp's. So I'm getting my servlet recognized but it isn't doing what I want. I'm going to try a different approach in my code. The way I have it now I'm using a print statement to output just a % action tag with appropiate body %. Brian -Original Message- From: Lenandlar Singh [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 1:17 PM To: Tomcat Users List Subject: RE: Accessing a servlet McRaven, Brian [EMAIL PROTECTED] wrote: I check out on all of that. I'm not sure if this is important but when I build the servlet there is an error that I get. It underlines my package and says that the package name was not one that it expected. Make sure your package declaration is correct. e.g. package firstservlet; Your servlet should be in here... -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 12:59 PM To: Tomcat Users List Subject: Re: Accessing a servlet ROOT/WEB-INF/classes/firstpack/JustALittleTest.class and JustALittleTest.java should have a package declaration of firstpack prior to compilation. McRaven, Brian wrote: Yes, the forms are in the ROOT webapp. The firstpack is in the ROOT/WEB-INF/classes folder. Where should the firstpack go? Brian -Original Message- From: Jon Wingfield [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 11:30 AM To: Tomcat Users List Subject: Re: Accessing a servlet You've deployed this in the ROOT webapp? form action should be /firstpack/JustALittleTest McRaven, Brian wrote: OK so now I have this: action=JustALittleTest/firstpack/JustALittleTest For a web.xml of file of: JustALittleTest firstpack.JustALittleTest JustALittleTest /firstpack/JustALittleTest And I get requested resource not found. Brian -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 11:05 AM To: Tomcat Users List Subject: Re: Accessing a servlet check your ./WEB-INF/web.xml FooServlet FooServlet FooServlet /servlet/Foo reference to invoke is ServletServletNameFromWeb.xml/Url-patternFromActionMapping e.g. FooServlet/servlet/Foo Martin-- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: McRaven, Brian To: Tomcat Users List Sent: Wednesday, July 12, 2006 10:43 AM Subject: RE: Accessing a servlet If the url-pattern should be /firstpack/JustALittleTest then should the form on the JSP refer to action=firstpack.JustALittleTest or action=firstpack/JustALittleTest ? Brian -Original Message- From: McRaven, Brian Sent: Wednesday, July 12, 2006 9:55 AM To: Tomcat Users List; [EMAIL PROTECTED] Subject: RE: Accessing a servlet When I use this entry I get a request resource not found error. JustALittleTest firstpack.JustALittleTest JustALittleTest /firstpack/JustALittleTest Under the previous error to this one I was using an entry of: JustALittleTest JustALittleTest JustALittleTest /firstpack.JustALittleTest With the following entry: JustALittleTest firstpack.JustALittleTest JustALittleTest /firstpack.JustALittleTest I get an error of 'Error allocating a servlet instance' Brian -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 12, 2006 9:46 AM To: Tomcat Users List Subject: Re: Accessing a servlet TheServletName package.ThisIsTheClassName TheServletName /a/path/to/theservlet servlet-name is used to link the definition to the mapping. defs are grouped together in web.xml, as are mappings. url-pattern refers to the path by which you'll access the servlet. it can any unique url on your system, and does not have to reflect the class name. McRaven, Brian wrote: I made the servlet part of a package but I'm getting a Servlet not Found Exception. The actions I took to make the servlet part of a package are the following: 1 added package line to java code, recompiled 2 placed new class file in new subdirectory of WEB-INF/classes folder with same name of package 3 changed entry in web.xml file to reflect package that servlet is in for the url-pattern 4 changed JSP so that the forms action=firstpack.JustALittleTest I've looked at the log files but I'm not sure what to look
File isn't found in ROOT directory
I have placed an index.jsp file that I created in my servers webapps/ROOT folder. When I place the following address in my browser: http://localhost/index.jsp I still come up with the tomcat homepage on my local host. I know that file is located in the ROOT/admin folder is there some way that my browser is overridding my request for my index.jsp file for the tomcat homepage index.jsp instead? I've tried opening other jsp's that I migrated to this folder and I get a 404 not found message when I do this. Brian
RE: File isn't found in ROOT directory
I'm using Tomcat 5.5.17 and the server.xml file has this in it: Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false Thanks, Brian -Original Message- From: Pid [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 11, 2006 10:56 AM To: Tomcat Users List Subject: Re: File isn't found in ROOT directory what version of tomcat? what have you got defined in the Host ...s in your server.xml? McRaven, Brian wrote: I have placed an index.jsp file that I created in my servers webapps/ROOT folder. When I place the following address in my browser: http://localhost/index.jsp I still come up with the tomcat homepage on my local host. I know that file is located in the ROOT/admin folder is there some way that my browser is overridding my request for my index.jsp file for the tomcat homepage index.jsp instead? I've tried opening other jsp's that I migrated to this folder and I get a 404 not found message when I do this. Brian - 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]
RE: File isn't found in ROOT directory
I commented out the servlet-mapping but I still get the tomcat page for index.jsp. With my installation of Tomcat there already was a folder called admin with index.jsp in it. I'm not sure if I was making that clear in my last post. I thought that was where the tomcat index.jsp was coming from. I notice that if I put my index.jsp in a subfolder of the ROOT directory then I can access it. Brian -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 11, 2006 11:32 AM To: Tomcat Users List Subject: Re: File isn't found in ROOT directory Two issue here: 1. Place the index.jsp in webapps/ROOT instead of webapps/ROOT/admin 2. ROOT context that comes with tomcat has all it's jsp files pre-compiled. Your new index.jsp is being ignored in favor of the pre-compiled version. Remove the servlet mapping in webapps/ROOT/WEB-INF/web.xml, restart tomcat (or just the ROOT webapp if you have the manager webapp up and running), and all should be as expected. --David Pid wrote: what version of tomcat? what have you got defined in the Host ...s in your server.xml? McRaven, Brian wrote: I have placed an index.jsp file that I created in my servers webapps/ROOT folder. When I place the following address in my browser: http://localhost/index.jsp I still come up with the tomcat homepage on my local host. I know that file is located in the ROOT/admin folder is there some way that my browser is overridding my request for my index.jsp file for the tomcat homepage index.jsp instead? I've tried opening other jsp's that I migrated to this folder and I get a 404 not found message when I do this. Brian - 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]
RE: File isn't found in ROOT directory
Dave et al, I'm not sure why my index.jsp file is now accessible but it is. I commented out the part of the web.xml file for the servlet-name and got an error. When I got rid of the comments my index file showed up in the browser on refresh as opposed to the tomcat version. All is well that ends well. I must have overlooked something in there like saving the web.xml file before I tried the address. I'm now having trouble getting my servlet recognized which I will post in a separate post. Brian -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 11, 2006 11:54 AM To: Tomcat Users List Subject: Re: File isn't found in ROOT directory admin/index.jsp is a placeholder page for the admin webapp, not shipped with tomcat. If you placed it there, the url would be http://localhost:8080/admin/index.jsp. --David McRaven, Brian wrote: I commented out the servlet-mapping but I still get the tomcat page for index.jsp. With my installation of Tomcat there already was a folder called admin with index.jsp in it. I'm not sure if I was making that clear in my last post. I thought that was where the tomcat index.jsp was coming from. I notice that if I put my index.jsp in a subfolder of the ROOT directory then I can access it. Brian -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 11, 2006 11:32 AM To: Tomcat Users List Subject: Re: File isn't found in ROOT directory Two issue here: 1. Place the index.jsp in webapps/ROOT instead of webapps/ROOT/admin 2. ROOT context that comes with tomcat has all it's jsp files pre-compiled. Your new index.jsp is being ignored in favor of the pre-compiled version. Remove the servlet mapping in webapps/ROOT/WEB-INF/web.xml, restart tomcat (or just the ROOT webapp if you have the manager webapp up and running), and all should be as expected. --David Pid wrote: what version of tomcat? what have you got defined in the Host ...s in your server.xml? McRaven, Brian wrote: I have placed an index.jsp file that I created in my servers webapps/ROOT folder. When I place the following address in my browser: http://localhost/index.jsp I still come up with the tomcat homepage on my local host. I know that file is located in the ROOT/admin folder is there some way that my browser is overridding my request for my index.jsp file for the tomcat homepage index.jsp instead? I've tried opening other jsp's that I migrated to this folder and I get a 404 not found message when I do this. Brian - 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] - 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]
Accessing a servlet
Well I'm ticking these newbie questions off. I have a simple servlet that I want my form to access. I compiled the file fine and it is called JustALittleTest.class. I placed this file in the ROOT/WEB-INF/classes folder. In my JSP I have a form with some submit buttons. The action element of the form is set to =JustALittleTest. I changed my web.xml file so it now has the following entries: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustAlittleTest.class/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/JustALittleTest.class/url-pattern /servlet-mapping I've tried a few changes to the above entries but I haven't gotten it right yet. Should the servlet-class value have a .class extension? Is my url pattern accessing the correct folder? Brian
RE: Accessing a servlet
I was able to refer to a book I have and so I dropped the .class extensions altogether. I get an error that requested resource is not available still. Any suggestions on this? My web.xml file has this entry: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustAlittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/JustALittleTest/url-pattern /servlet-mapping And my action attribute=JustALittleTest. Brian -Original Message- From: McRaven, Brian Sent: Tuesday, July 11, 2006 1:14 PM To: users@tomcat.apache.org Subject: Accessing a servlet Well I'm ticking these newbie questions off. I have a simple servlet that I want my form to access. I compiled the file fine and it is called JustALittleTest.class. I placed this file in the ROOT/WEB-INF/classes folder. In my JSP I have a form with some submit buttons. The action element of the form is set to =JustALittleTest. I changed my web.xml file so it now has the following entries: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustAlittleTest.class/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/JustALittleTest.class/url-pattern /servlet-mapping I've tried a few changes to the above entries but I haven't gotten it right yet. Should the servlet-class value have a .class extension? Is my url pattern accessing the correct folder? Brian - 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: Accessing a servlet
OK I did that and now my system is hanging which I guess could be an error in my code or something with the server. I think it is my code so I'll look that over. Thanks for your help. Sorry for the confusion. Brian -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 11, 2006 2:48 PM To: Tomcat Users List Subject: Re: Accessing a servlet Did you reload the webapp after making the change? All changes to WEB-INF/web.xml or files in WEB-INF/classes and WEB-INF/lib will require a reload before they become active in tomcat. --David McRaven, Brian wrote: I was able to refer to a book I have and so I dropped the .class extensions altogether. I get an error that requested resource is not available still. Any suggestions on this? My web.xml file has this entry: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustAlittleTest/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/JustALittleTest/url-pattern /servlet-mapping And my action attribute=JustALittleTest. Brian -Original Message- From: McRaven, Brian Sent: Tuesday, July 11, 2006 1:14 PM To: users@tomcat.apache.org Subject: Accessing a servlet Well I'm ticking these newbie questions off. I have a simple servlet that I want my form to access. I compiled the file fine and it is called JustALittleTest.class. I placed this file in the ROOT/WEB-INF/classes folder. In my JSP I have a form with some submit buttons. The action element of the form is set to =JustALittleTest. I changed my web.xml file so it now has the following entries: servlet servlet-nameJustALittleTest/servlet-name servlet-classJustAlittleTest.class/servlet-class /servlet servlet-mapping servlet-nameJustALittleTest/servlet-name url-pattern/JustALittleTest.class/url-pattern /servlet-mapping I've tried a few changes to the above entries but I haven't gotten it right yet. Should the servlet-class value have a .class extension? Is my url pattern accessing the correct folder? Brian - 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]
Not able to start server
I have two separate installations of tomcat. One is version 5.5 and the other is something I downloaded from www.coreservlets.com that is a preconfigured version of tomcat 5.5.9. I have two separate errors with these programs when I go to start up the server. A solution to either would be great. So which ever one seems like the best one to reply on. With the regular full version I get an error of the start up hangs after this line is printed: (Date and Time) org.apache.catalina.startup.Catalina start This happens early in the start up process and couldn't be more than 10 lines like that deep into the program. I think I managed to get all of the proper changes implemented to make the tomcat server run but I may have missed one. I've looked over the list on www.coreservlets.com website and I think I got all modifications placed correctly but I am a little grey in there in places. On the preconfigured version I get a different sort of error. The server runs through all of its set up lines from what I can tell but the program just runs straight through and I'm left with out a window for my server. I just tried running the program and I got the same hang state on the same line as I get for the full version of tomcat. I'm using port 80. Brian McRaven