novices new to jsp, there are two simple questions to ask you ;
1. My myeclipse project directory web-inf folder, how no classes folder in the tomcat project file but you can see ;
2.servlet in web.xml how to write
hope to have good people to answer in detail under these few simple questions , grateful ah
------ Solution ------------------------------------ --------
1, classess should exist in your web projects , rather than in your project in myeclipse . If you use the tomcat and virtual path is not configured , the following should be that corresponding to the webapps folder . But you can find in the build inside the class bytecode files .
2,2. servlet in web.xml how to write
This is no folder , just a virtual path . How to write whatever you can .
Under normal circumstances , your servlet1 is a class that put the location where is it . WEB-INF in the class you are in , usually WEB-INF where the data are not directly accessible .
So you need to configure a virtual path to allow outsiders access to him. ( For example, you configured here servlet/servlet1, is the case )
under your project will not have this folder .
And, personally feel that it is best not to put a servlet virtual path of the folder to build out, to avoid confusion.
------ For reference only -------------------------------------- -
very detailed , thanks
没有评论:
发表评论