can anyone make what is the diff between
form.action="/myservlet/HelloServlet"
form.action="HelloServlet"
During a http post request for some web pages(not all)devloped using MVC2
architecture the uri is completly replaced by (form.acion value) and not
(context path+form.action value)
eg
context path=/contextpath
form.action="/myservlet/HelloServlet"
for post method the URL goes like this
invalid- http://localhost:8084/myservlet/HelloServlet
and not
http://localhost:8084/contextpath/myservlet/HelloServlet
when form.action="HelloServlet"
everything is working properly
Note :-
The web.xml is configured properly
-
url mapping in Netbeans (2 messages)
- Posted by: sri vaths
- Posted on: March 15 2005 06:22 EST
Threaded Messages (2)
- Missing information by Christopher Stehno on March 15 2005 08:50 EST
- clarification given by sri vaths on March 15 2005 22:27 EST
-
Missing information[ Go to top ]
- Posted by: Christopher Stehno
- Posted on: March 15 2005 08:50 EST
- in response to sri vaths
I think I need a bit more information so I can help you.
First of all NetBeans is an IDE. The problem you are having is with a web server (probably embedded in NB, but still a web server issue).
What server and version of that server are you using?
Second, you need to describe your problem more clearly. I cannot tell what you are trying to do, so I cant help you figure out what is wrong. -
clarification given[ Go to top ]
- Posted by: sri vaths
- Posted on: March 15 2005 22:27 EST
- in response to Christopher Stehno
server version jakarta-tomcat-5.0.28
diff between
1)form.action="servletname"
2)form.action="/mydir/servletname"
while i use 1 from ide and outside ide
url pattern is http://localhost:8084:/contextpath/mydir/servletname
but using 2 ->this works fine outside ide
but when executed form ide
url pattern is http://localhost:8084:/mydir/servletname
in web.xml
<servlet>and <servlet-mapping>are done correctly