Re: TC 9.0.21: ContextListener + Servlet app

2019-06-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tommy, >> I have some theories that I'm trying to do a PoC for. I was >> debating between have a class to generate the HTML content for >> setup but it would make the page design more complicated and >> additional development time for something

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-21 Thread Mark Thomas
On 21/06/2019 11:04, Tommy Pham wrote: > Thank you for the clarification and the heads up. I greatly appreciate it. > I've been thinking about different methods of approach and I think this is > better than servletPath + pathInfo: > > return getServletContext() == null ? null : getServl

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-21 Thread Tommy Pham
Hi Mark, On Thu, Jun 20, 2019 at 11:57 PM Mark Thomas wrote: > On 21/06/2019 03:21, Tommy Pham wrote: > > > > > > After some further research, it appears the issue I'm encountering is > known > > since 2007 by IBM at least: > > > > https://www-01.ibm.com/support/docview.wss?uid=swg21259282 > >

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-20 Thread Mark Thomas
On 21/06/2019 03:21, Tommy Pham wrote: > > > After some further research, it appears the issue I'm encountering is known > since 2007 by IBM at least: > > https://www-01.ibm.com/support/docview.wss?uid=swg21259282 > > While reviewing the JSR-369 history, at jcp.org, it seems that this is > sinc

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-20 Thread Tommy Pham
Hi Chris, On Sat, Jun 15, 2019 at 10:44 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Tommy, > > > Why not allow Tomcat to serve everything in the web application (other > than /WEB-INF/* and /META-INF/*) as usual? What is i

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-20 Thread Tommy Pham
After some further research, it appears the issue I'm encountering is known since 2007 by IBM at least: https://www-01.ibm.com/support/docview.wss?uid=swg21259282 While reviewing the JSR-369 history, at jcp.org, it seems that this is since servlet spec 2.3, perhaps even earlier. Does anyone kn

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-20 Thread Tommy Pham
Hi Mark, On Thu, Jun 20, 2019 at 3:58 AM Mark Thomas wrote: > On June 20, 2019 10:00:12 AM UTC, Tommy Pham wrote: > > > > >> In looking at the code for ApplicationHttpRequest [1] for the > >> getPathTranlated() > >> > >> @Override > >> public String getPathTranslated() { > >> i

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-20 Thread Mark Thomas
On June 20, 2019 10:00:12 AM UTC, Tommy Pham wrote: >> In looking at the code for ApplicationHttpRequest [1] for the >> getPathTranlated() >> >> @Override >> public String getPathTranslated() { >> if (getPathInfo() == null || getServletContext() == null) { >> return

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-20 Thread Tommy Pham
Hi Mark, On Sun, Jun 16, 2019 at 2:25 AM Tommy Pham wrote: > Hi Chris, > > Thank you for the feedback. > > On Sat, Jun 15, 2019 at 10:44 PM Christopher Schultz < > ch...@christopherschultz.net> wrote: > >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA256 >> >> Tommy, >> >> On 6/15/19 21:51, T

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-20 Thread Tommy Pham
Hi Chris, On Mon, Jun 17, 2019 at 2:11 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Tommy, > > Tommy, > > > > On 6/15/19 21:51, Tommy Pham wrote: > Hi Mark, > > After some research and thought about internal a

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 6/16/19 14:58, André Warnier (tomcat) wrote: > On 16.06.2019 07:39, Christopher Schultz wrote: [...] >> >> Surprisingly, > > -1 Meh. >> browsers do not use the value for "id" as the "name" when a name >> is not specified for an tag. W

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-17 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tommy, > Tommy, > > On 6/15/19 21:51, Tommy Pham wrote: Hi Mark, After some research and thought about internal application flow, I think the 'cleanest' is have TC's default servlet handle the *.html requests and use the as

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-16 Thread tomcat
On 16.06.2019 07:39, Christopher Schultz wrote: [...] Surprisingly, -1 browsers do not use the value for "id" as the "name" when a name is not specified for an tag. Without a "name" attribute, the form element is not sent to the server. :( Not really surprising, see : 1) https://www.w3sc

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-16 Thread Tommy Pham
Hi Chris, Thank you for the feedback. On Sat, Jun 15, 2019 at 10:44 PM Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Tommy, > > On 6/15/19 21:51, Tommy Pham wrote: > > Hi Mark, > > > > After some research and thought about inte

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Tommy, On 6/15/19 21:51, Tommy Pham wrote: > Hi Mark, > > After some research and thought about internal application flow, I > think the 'cleanest' is have TC's default servlet handle the *.html > requests and use the assigned filter to restrict th

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-15 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Mark, On 6/14/19 16:48, Mark Thomas wrote: > On 14/06/2019 21:10, Tommy Pham wrote: >> 2) I Have this small and simple HTML form: >> > type="submit" value="enter"> My servlet's doPost is >> triggered but when I iterate the request.getParameterM

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-15 Thread Tommy Pham
Hi Mark, After some research and thought about internal application flow, I think the 'cleanest' is have TC's default servlet handle the *.html requests and use the assigned filter to restrict the access as desired. Is there a better approach? On that plan, I have this mapping for TC's default s

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-14 Thread Tommy Pham
Hi Mark, Thanks for the prompt reply. I'll try with Filter for (1). I figured out what I did wrong with (2). I was missing the HTML attribute 'name' for the text input. It's been a couple years since I've wrote a HTML page. Thanks again for your help, Tommy On Fri, Jun 14, 2019 at 1:48 PM Ma

Re: TC 9.0.21: ContextListener + Servlet app

2019-06-14 Thread Mark Thomas
On 14/06/2019 21:10, Tommy Pham wrote: > 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 li

TC 9.0.21: ContextListener + Servlet app

2019-06-14 Thread Tommy Pham
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