hello again, i have configured tomcat for servlets. i want to know that is it necessary to put the jsp files in example directory only?? i have a directory( say c:\sach ) and want to put my files in it,how can i do that? what changes shd i have to make?? thanks in advance sachin
Hello Sachin! Well, as long as you put your JSP pages somewhere under your root directory of Tomcat ('webapps/ROOT'), everything should be fine. I might have misunderstood your problem, if this is the case I appologize for my simple answer. Regards
------------------ Dominic Steng�rd Sun Certified Java 2 Programmer ------------------
Hi Sachin.It is not necessary to put your jsp files in any particular directory.You will just have to add the necessary context to your tomcat configuration. For example,I put all my jsp files in a directory c:\jsptest\udayan\.Then,for tomcat to see these files,i add the necessary Context in the server.xml file in the conf directory of tomcat.
So when u specify the URL http://localhost:8080/jsp/SomeProgram.jsp the appropriate SomeProgram.jsp file ,which lies inside c:\jsptest\udayan\ will be executed. I hope that helps. [This message has been edited by Udayan Naik (edited March 25, 2001).]
Udayan Naik<BR>Sun Certified Programmer for the Java 2 Platform
Hi Sachin U can put ur JSP files anywhere u desire provided .. u make the necesary change in the Server.xml file. Here's a sample.I have changed my directory to C:\ucvs <Context path="/examples" docBase="C:\Ucvs\" crossContext="false" debug="0" reloadable="true" > </Context> Hope the abv helps Regds Hemanth
Hello all, SuperNewbieGreenHorn Joel here... I have also configured Tomcat (standalone on Win9x for now...)for Servlets and have been able to get Servlets to run as desired but have had no luck with .jsps, and I'm sure that this <CONTEXT> thing is it. (what is the docType?) Silly question though, how do I edit an XML file? When I opened it in NotePad I could read the text, but there were a lot of filled in blocks (which tells me bad characters). I'll have a lot more questions soon, but if I could get this one answered I could play around a bit first... Thanks! ------------------ Joel Cochran [This message has been edited by Joel Cochran (edited March 26, 2001).]
Wait a minute, I'm trying to think of something clever to say...<p>Joel
Joel, The 'web.xml' file is just a text file. All chars should be human readable. I just copy and paste the sampel C:\jakarta-tomcat\webapps\examples\WEB-INF/web.xml file in my machine for your reference. Please check it out. regds maha anna
Joined: Mar 15, 2001
Originally posted by Joel Cochran: Silly question though, how do I edit an XML file? When I opened it in NotePad I could read the text, but there were a lot of filled in blocks (which tells me bad characters).
There is nothing wrong with ur xml file Joel.Just open it with WordPad.U will not get those filled in blocks. Regds Hemanth
Joined: Mar 23, 2001
Hemanth and Maha Anna...THANKS! yesyesyesyesyesyesyesyesyes!!! After a little trial and error I got my first .jsp to work. I forgot that XML is case sensitive, so I got a lot of errors starting Tomcat when I entered "docbase" instead of "docBase", but now I am on my way! Much thanks! ------------------ Joel Cochran [This message has been edited by Joel Cochran (edited March 27, 2001).]