Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how o set context path in tomcat6

843785Sep 10 2008 — edited Sep 10 2008
Hi friends,
I am using Tomcat 6. Here i am not able to set the context path. previously in tomcat 4. we used to set the context path in server.xml(which exists under *"\Apache Group\Tomcat 4.1\conf"*). For example i am using one class named "HelloUserGenericServlet.class" which i have kept inside "*G:\J2eePractice\myapp\WEB-INF\classes*" folder and web.xml inside"*WEB-INF*". So in tomact4i used to set the context path in context.xml like " *<Context path="/myapp" docBase="E:\temp\myapp" debug="0"/>* ". But in Tomcat 6 there is no context field exists.

After going through some documents i got this point that we have to set the context path in "server.xml" in conf directory. so there i simly put this line "*<Context path="/myapp" docBase="E:\temp\myapp" debug="0"/>* . but it's not working. its throwing error"404"
So can u friends please tell me how to solve this problem?

The content of web.xml in WEB-INF directory is as follows
+"<?xml version="1.0" encoding="ISO-8859-1"?>+

+<!DOCTYPE web-app+

PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

+"htp://java.sun.com/dtd/web-app_2_3.dtd">+

+<web-app>+

+<display-name>My Application</display-name>+

+<description> My Application</description>+

+<servlet>+

+<servlet-name>HeloWorldGenericServlet</servlet-name>+

+<servlet-clas>HeloWorldGenericServlet</servlet-class>+

+</servlet>+

+<servlet-mapping>+

+<servlet-name>HeloWorldGenericServlet</servlet-name>+

+<url-patern>/HeloWorldGenericServlet</url-patern>+

+</servlet-mapping>+

+</web-app>+ "

Comments

Paulzip

You only have to worry about objects that reference the invalid objects (directly or through other dependencies), not objects that the invalid objects reference (caveated that they are not referenced by another invalid object).

E.g. Dropping PLAP/TEMP_DIS_CONSTR/PROCEDURE, won't affect SYS/ALL_CONS_COLUMNS/VIEW

BEDE

That depends...

Some of those invalid packages/procedures/functions/views may need to have their code changed so that they may be used later on. So, I don't think it is the case to rush into such spring cleaning. First use dbms_utility.compile_schema(x_schema,false) to see what can recompile, then send all the developers you know to be working on that database a list of the invalid objects, eventually including also the errors, with the warning that, if in within two weeks they won't fix them, then they will be dropped.

Yet, if your concern is space, tables are those that take most of the space.

4089142

Thanks so much! That's exactly what I did. First I tried to see what invalid objects I could recompile (except I used @utlrp.sql). Then, I sent all the developers a list of the invalid objects with each error included so that they can look through and fix the code if need be.

4089142

Thanks for the clear and concise answer Paulzip! This is exactly what I needed to know!

1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Oct 8 2008
Added on Sep 10 2008
2 comments
321 views