对于第2个问题,可以通过session来解决,第4个问题,是配置一个examples的虚拟目录

解决方案 »

  1.   

    在你的第三个问题中加入<welcome-file>login.jsp
    </welcome-file>
    就解决你的第一个问题了
      

  2.   

    第二个和第六个可以用session解决
      

  3.   

    2.可以在页面中作限制。
    3.当你的目录中存在着三个文件时,输入目录地址时将自动转入这个文件,三个文件的级别和顺序有关,如果没有三个文件时,如果服务器设置为目录浏览则出现目录中的文件。如果禁止则提示禁止访问页面
    4进行虚拟目录的设置。path为路径,docbase为虚拟目录名称。
    6。可以在服务器中设置。
      

  4.   

    6
    如果是resin的话在web.xml中加入  <web-app>  
    <directory-servlet  id='false'/>  如果是tomcat的话也在web.xml中加入<init-param>  
    <param-name>listings</param-name>  
    <param-value>false</param-value>   
    </init-param>
    </web-app>
      

  5.   

    1。把login.jsp设置为首业。
    2。用session。在页面里面判断,也可以对你不详让看到的页面家filter做你想要的屏蔽。
    3。
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    是把这几个页面设置为首业
    <Context path="/examples" docBase="examples" debug="0"
                     reloadable="true" crossContext="true">
    是什么意思?
    是当servlet重新编译后不用重新启动服务器。
    5。这样的连接使怎么实现的??
    在你的网站守业中做也面跳转
    6。如何禁止直接输入目录访问:
    比如:
    http://localhost/test/coontent
    加filter实现
      

  6.   

    1。如何达到这样的效果
    在浏览器的地址栏只显示
    http://localhost/test
    而不是显示:
    http://localhost/test/login.jsp
    答:第一步:在server.xml里设置test虚拟目录,添加在<context></context>即可,第二步在test虚拟目录下的WEB-INF/web.xml里设置
    <welcome-file-list>
        <welcome-file>login.jsp</welcome-file>
    </welcome-file-list>2。如何禁止用户访问页面:
    比如目录下面有login.jsp,content1.jsp,content2.jsp
    用户只能访问:
    http://localhost/test/login.jsp
    而不能访问:
    http://localhost/test/content1.jsp
    http://localhost/test/content2.jsp
    答:通过session作鉴权3。
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    是什么意思??
    答:设置默认欢迎界面,如问题1所述,比如你进入www.sohu.com很可能实际上看到的是它的index.html.4。
    <Context path="/examples" docBase="examples" debug="0"
                     reloadable="true" crossContext="true">
    是什么意思?
    设置虚拟目录,前面对应的是虚拟目录名称,后面是物理路径,其中reloadalbe=true表示servlet重新编译后不用重启Web服务器
    55。这样的连接使怎么实现的??
    www.mail.sohu.com
    如果我
    http://mail.localhost
    答:学习中.这个可能牵扯到DNS设置,不太清楚.6。如何禁止直接输入目录访问:
    比如:
    http://localhost/test/coontent
    应该提示:
    Forbidden
    You don't have permission to access /elady/inforcenter/ on this server.Apache Server at www.ciweekly.com Port 80加过滤,采用filter