Forums Register Login
How to Configuring Servlet Mappings?
Hi Friends...

iam wondering for servlet...
i found a problem when i developed servlet and mapped it..
i made a simple servlet + JSP application..
at JSP, when i posted to servlet mapping /Servlet1... it could ran well..
but when i posted to servlet mapping /Servlets/Servlet3.. i couldn't ran well..

here is my Servlet mapping..

And here is my JSP :

Sorry for the basic question..

Thanks in advance..

Leonardo Carreira wrote: it couldn't ran well..

what happen to that ! what is the problem exactly?.post your error message. it help us to find out the problem

Thanks for your reply sir..
yap, i got error HTTP 404 Not Found when i clicked a button at the JSP..
is My Servlet Mapping configuration true or not?..

yap, at JSP, the main problem is i want to execute servlet (Servlet3). And i written JSP code like this (but these couldn't ran well)..

but when i executed another servlet (Servlet1), with JSP code like this : (these could ran well)..

Thanks in advance..
try below one

scriptlet is discourage in jsp. if you know EL then use else try to know about it

using EL

Thanks sir..

it could ran well now..
i use EL.. by the way, what is the mean of EL?..

with <%=request.getContextPath()%> it still could'nt ran..
which one is good for implementation (general implemenattion)? request.getContextPath() or EL?..

Thanks in advance..

Leonardo Carreira wrote:Thanks sir..

You are welcome.
to know about EL, Google "EL in jsp" . and directly putting the java code in jsp (using scriptlet) is bad practice ,difficult to maintain in future . so we recommend EL
30 seconds to difuse a loaf of bread ... here, use this tiny ad:
java tutor first lesson for free

This thread has been viewed 1086 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 21, 2019 14:45:29.