Bijesh Vijayan

Greenhorn
+ Follow
since Aug 08, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bijesh Vijayan


I tried, to separate both the context

so now my directory structure is
/home/bijesh/Employee/WEB-INF/web.xml
/home/bijesh/Reports/WEB-INF/web.xml

I changed the doc base in context.xml
/home/bijesh/tomcat7/conf/Catalina/localhost/Employee.xml
/home/bijesh/tomcat7/conf/Catalina/localhost/Reports.xml
(I changed the name from Employee#Reports.xml to Reports.xml)

Still not loading the filter.
One thing also I noticed, in tomcat5 catalina.jar, there is a class named StandardHostDeployer, but its missing in tomcat7 catalina.jar. Also couple of other classes are missing in tomcat 7 catalina.jar(Eg:- HttpRequest, HttpResponse). Is there any way we can get these in tomcat 7

Bijesh.





12 years ago

Fine, so in tomcat5, the filter is loading for each context(Employee and Employee/Reports), but in tomcat7, its not loading for both(the init() method is not getting triggered).

In both the filter is not declared in the web.xml(/homes/bijesh/Employee/WEB-INF/web.xml and /homes/Employee/Reports/WEB-INF/web.xml)

The filter is defined only in /home/bijesh/tomcat7/conf/web.xml

Do we need to do anything for tomcat7 ?
12 years ago

not nested context. (I think so, as it has got separate context files and separate path and docBase)

# I added as in tomcat5, the context names are Employee-context.xml and Reports-context.xml
I used # as per the below site(see the heading Naming).

http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

12 years ago
I was also getting the below error in the front end

HTTP Status 404 - /Employee/servlet/Authenticate
12 years ago
Hi,

I was trying to migrate from tomcat 5 to tomcat 7.

I copied the following contents from tomcat5/conf/web.xml to tomcat7/conf/web.xml

<filter>
<filter-name>Authenticate Filter</filter-name>
<filter-class>com.emp.EmpAuthorizationFilter</filter-class>
<init-param>
<param-name>SecurityLevel</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>Debug</param-name>
<param-value>1</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Authenticate Filter</filter-name>
<url-pattern>/servlet/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Authenticate Filter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Authenticate Filter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>Authenticate Filter</filter-name>
<url-pattern>*.exe</url-pattern>
</filter-mapping>

<servlet>
<servlet-name>Authenticate</servlet-name>
<servlet-class>com.emp.EmpPortalAuthenticationForm</servlet-class>
</servlet>

<login-config>
<auth-method>FORM</auth-method>
<realm-name>UMIPortal Form-Based Authentication Area</realm-name>
<form-login-config>
<form-login-page>/servlet/Authenticate</form-login-page>
<form-error-page>/servlet/AuthenticateError</form-error-page>
</form-login-config>
</login-config>

I have more than one context. one in Employee and one Employee/Reports
the contexts are defined in

tomcat7/conf/Catalina/localhost/Employee.xml
<Context path="/Employee"
docBase="/home/bijesh/Employee"
crossContext="true"
reloadable="false"
workDir="Employee">

tomcat7/conf/Catalina/localhost/Employee#Reports.xml
<Context path="/Employee/Reports"
docBase="/home/bijesh/Employee/Reports"
crossContext="true"
reloadable="false"
workDir="Employee/Reports">

The filter jar is available in /home/bijesh/Employee/WEB-INF/lib and /homes/bijesh/Employee/Reports/WEB-INF/lib

The filter is initiated for the second app.

Bijesh.

12 years ago