Copy your servlet class file into the following directory:
config/mydomain/applications/
DefaultWebApp/
WEB-INF/classes.
(Where mydomain is the name you specified as the WebLogic Admin Domain Name during installation.) If your servlet class has a package statement, create an additional subdirectory for each level of the package statement. For example, if your package statement is
Package color.blue, then place your servlet class in the following directory:
config/mydomain/applications/
DefaultWebApp/
WEB-INF/classes/color/blue. If you do not have a servlet class to use for this quick start, and you have installed the WebLogic Server examples, you can use one of the servlets in the examples provided with the WebLogic Server distribution, located in the following directory of your WebLogic Server installation:
config/examples/applications/
examplesWebApp/WEB-INF/classes/
examples/servlets/
HelloWorldServlet.class.
Modify the web.xml file located in the config/mydomain/applications/
DefaultWebApp/
WEB-INF/ directory of your WebLogic Server installation by adding the following, in between the <web-app> and </web-app> tags:
<servlet>
<servlet-name>
myServlet
</servlet-name>
<servlet-class>
package.name.myServlet
</servlet-class>
</servlet><servlet-mapping>
<servlet-name>
myServlet
</servlet-name>
<url-pattern>
quickStartServlet
</url-pattern>
</servlet-mapping>
where:
myServlet is the name of your servlet class file.
package.name.myServlet is the full package name of your servlet class.
config/mydomain/applications/
DefaultWebApp/
WEB-INF/classes.
(Where mydomain is the name you specified as the WebLogic Admin Domain Name during installation.) If your servlet class has a package statement, create an additional subdirectory for each level of the package statement. For example, if your package statement is
Package color.blue, then place your servlet class in the following directory:
config/mydomain/applications/
DefaultWebApp/
WEB-INF/classes/color/blue. If you do not have a servlet class to use for this quick start, and you have installed the WebLogic Server examples, you can use one of the servlets in the examples provided with the WebLogic Server distribution, located in the following directory of your WebLogic Server installation:
config/examples/applications/
examplesWebApp/WEB-INF/classes/
examples/servlets/
HelloWorldServlet.class.
Modify the web.xml file located in the config/mydomain/applications/
DefaultWebApp/
WEB-INF/ directory of your WebLogic Server installation by adding the following, in between the <web-app> and </web-app> tags:
<servlet>
<servlet-name>
myServlet
</servlet-name>
<servlet-class>
package.name.myServlet
</servlet-class>
</servlet><servlet-mapping>
<servlet-name>
myServlet
</servlet-name>
<url-pattern>
quickStartServlet
</url-pattern>
</servlet-mapping>
where:
myServlet is the name of your servlet class file.
package.name.myServlet is the full package name of your servlet class.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货