I just started a new job as a java programmer for three days without previous experience in this area. The major part of the project I am working with is done, my duty is to extend its feature and fix some bugs. I am so frustrated because I am still struggled with the working enviroment without do anything. The problems I met are: 1. I have development directory like this: src ...myproject ...mysystem in src\myproject\mysystem. there is a servlet called myfile1.java (its first line shows: package myproject.mysystem) using other files in the same directory. I successfully compiled all other files in src\myproject\mysystem(which are self contained) and java serlvets in \src which import myproject.mysystem, but the stubbon myfile.java refused to be compiled, even I set the classpath to c:\src;c:\src\myproject;c:\src\myproject\mysystem How shall I set classpath to compile myfile1.java. 2. Some files reference servlet like this: <a herf="/servlets/ThisServlet"> it still works. The textbooks I have read refernces serlvets like this:<a herf="serlvet.ThisServlet> How can I configure web.xml so that I can use /servlets to link to a serlvet?
Thank you very much for your help! [ March 23, 2002: Message edited by: Mei Xiao ]
it seems you are really new to java and servlet. Here we go, Let's get back to work, change compiling work directory to src and make sure you include . in your classpath. use command c:>echo %classpath% to make sure you have . in your classpath then src>javac myproject\mysystem\myfile.java after compile copy myproject\mysystem\myfile.class and its related class files to WEB-INF\classes directory in your web application directory then open web.xml file in directory WEB-INF you may look in example app to find out how to register you servlet class and UrlMapping to the way you want.
If I am rich, I will spend more.<p>IBM 486 (OOAD & UML) & 141 (XML) passed<br />Oracle 1Z0-007 passed<br />MCSD MCDBA MCSE <br />SCJP SCSSA<br />CCNA CNA A+