Answer Posted / chandra kunchala
you can invoke the servlet by two ways
one is dierctly u can invoke from address bar
like the following
http://<servername>:<port-Number>/<web-application-name>/<url-pattern
of perticular servlet>
eg:- http://localhost:8080/app1/test
second one is u can invoke by using form..
<form action="/app1/test">
.....
.....
</form>
web.xml:-
<servlet>
<servlet-name>FirstServlet</servlet-name>
<servlet-class>pack1.pack2.ClassName</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>FirstServlet</servlet-name>
<url-pattern>/test</url-pattern>(test should be equal
to what u typed in the address bar after the web-application
name or should be equal to what u mention in the form action
after the web-application name)
</servlet-mappin>
Is This Answer Correct ? | 16 Yes | 7 No |
Post New Answer View All Answers
Hi frnd can i any one kindly can post for me portlet,hibernate and spring example application and with flow explantion configuration using Jdeveloper.and related links ar tutorials kindly please send me .its urgent for me .thanks in advance...........else can any one send to kondaiah.goddeti@gmail.com
How do you invoke a Servlet? What is the difference between doPost method and doGet method?
What is called Scriptlet?
What are the ways to handle multi-threading in servlets?
What do you mean by servlet context?
How to handle exceptions thrown by application with another servlet?
Elucidate servlet attributes and its scope?
List some life cycle methods of a servlet.
How many servlet objects are created?
When should you prefer to use doget() over dopost()?
What is servlet and list its types?
What do you mean by singlethreadmodel interface?
What is the procedure for initializing a servlet?
Explain the steps involved in placing a servlet within a package?
Difference between forward() method and sendredirect() method ?