Hello everyone,
I'm trying to write a lightweight and hopefully simple ContextListener +
Servlet application but running into 2 issues I'm unable to find resolution
for and hoping someone would please point me in the right direction:
1) I'd like to have Tomcat's default servlet serve HTML files only within
directory /path/ and its' subdirectories. However, I can only get it to
work with this URL mapping "/path/*". My understanding is that the default
servlet will serve any files within /path/. Can this be done with URL path
mapping or do I need to write a custom filter? My servlet's mapping is
"/". Tomcat's default servlet mapping has "/css/*", "/js/*", "/img/*", and
"/path/*".
2) I Have this small and simple HTML form:
<form method="post">
<p><input id="text" type="text" size="80"></p>
<p><input type="submit" value="enter"></p>
</form>
My servlet's doPost is triggered but when I iterate the
request.getParameterMap(), it's empty. When I tried to
request.getParameter("text"), it returned 'null'. I do have a filter in
place but it's only to log all request access to a database backend
eventually. That filter is currently dumping it to log. I've tried
disabling the filter but have the same result.
Thank you,
Tommy