on 01-09-2007 11:43 AM
Hi
Please tell me how to run servlets in NWDS.
I made a simple program but now I am not able to deploy/run.
Help me out
Hi,
1)You have to create a J2EE Web Application project.
2)Then create a servlet in this project.
3)Once you are done coding the servlet, create a J2EE EAR project.
4)Add the Web project to EAR project.
5)Open application.xml in EAR project, goto modules section, select web component, specify the context root (like /mycontext)
6)Build and deploy EAR.
You can run your servlet as:
http://<server>:<port>/mycontext/<servlet-name>;
Hope it helps.
Rajit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Vivek,
Yes, you've to give url pattern in web.xml for the servlet. Open xml in studio, goto Mapping tab, add a new servlet mapping and give the url pattern.
Context path is the entry point to your web application isnt it?
Thanks,
Rajit
Awarding points to helpful answers encourage others to help you better.
If you not yet found... here is the link
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/cfc19866-0401-0010-35b2-dc8158247fb6
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.