This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
Please find below the configuration in my web.xml file
As per the tutorial whenever the request for HelloWorldExample( provided by Tomcat ) is sent the page will be redirected to the
CAS Login page.
Problem facing:
If I map the "CAS Filter" using "servlet-name" element "HelloWorldExample" in "filter-mapping" element redirection as mentioned above is working.
In case of using "/*" as the "url-pattern" element the redirection is working.
But in case of "url-pattern" element as "/servlet/*" the page gets redirected to actual JSP page which renders "Hello World".
ERROR! All classes used in servlets MUST be in a package. The JVM is looking for this class in the "current directory" and not finding it, the servlet instance is never created.
ERROR! All classes used in servlets MUST be in a package. The JVM is looking for this class in the "current directory" and not finding it, the servlet instance is never created.
I agree, the classes should be created with a proper package structure.But these are the classes provided by Tomcat and not created by me.
Still my query remains unanswered.
When I am using following filter-mapping
the filter does not intercept(i.e the page does not redirect to CAS login page) and the Hello World JSP page is displayed straightaway.
On the other hand following when using following filter-mapping
the filter intercepts and the page is redirected to CAS login page.
In TOMCAT_HOME/conf/web.xml the servlet and servlet-mapping elements for Invoker Servlet are commented out.Thus I suppose it is not the Invoker Servlet which is processing the URL
Then in case of url-pattern "/servlet/*" what is causing the configured filter to not get invoked or intercept the request to HelloWorld.
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12324
1
posted
0
But these are the classes provided by Tomcat
Yes, I see that the Tomcat distribution still comes with servlet examples without a package. A REALLY STUPID IDEA by the Tomcat people left over from the very first servlet container versions.
The problem is that these classes are NOT executed by the normal mapping in web.xml - instead they are executed by the Invoker -
Therefore you can NOT use any parameters, filters, etc in normal web.xml practice with them.
Bill
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.