cancel
Showing results for 
Search instead for 
Did you mean: 

How to run Servlets

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

Dear Rajit

Thanks for the response

Dont we have to give url pattern in web.xml and also what is this context-path in application.xml.

Waiting for your response

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi

Please provide me the link to downlaod NWDS.

I want different versions of NWDS for Windows and also the various Service Pack available for them.

Former Member