A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java 8 in Action
this week in the
how to map url in java
Joined: Jul 24, 2012
Sep 09, 2012 03:22:13
I am beginner in Java, I had a problem in mapping the url with action attribute.
for example i have this web.xml
then how can i call this
what to write in action?
<form action="??" method="get" >
Joined: Jul 15, 2012
Sep 09, 2012 04:01:03
this "web.xml" is not your servlet...
web.xml passes the clients request to servlet hiddenly...
so, that the client get no idea where your servlet is placed..
for clearification suppose..
<form method="post" action="foo.do">
<servlet-name>foo file<servlet-name> //this is any name by your choice so, that your xml file knows this
<servlet-class>com.example.foo<servlet-class> // this is the actual path of your servlet in com.example package
Author and ninkuma
Joined: Jan 10, 2002
Sep 09, 2012 11:16:14
This was discussed in
this topic just yesterday. Please SearchFirst.
Asking smart questions
Books by Bear
subject: how to map url in java
how to connect Jsp to servlet to process parameters
Call servlet from very first JSP
Servlet and XML result HTTP 404
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014