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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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

JAP iDBA

Hello.

Thanks for sharing.


I receive the following error message:

/vagrant/scripts/kubeadm-setup-master.sh: Login to container-registry.oracle.com

Username (japablo@mercuritech.com):

Password:

Login Succeeded

/vagrant/scripts/kubeadm-setup-master.sh: Setup Master node -- be patient!

/vagrant/scripts/kubeadm-setup-master.sh: kubeadm-setup.sh did not complete successfully

Last lines of kubeadm-setup.log:

Starting to initialize master node ...

Checking if env is ready ...

Checking whether docker can pull busybox image ...

Checking access to container-registry.oracle.com/kubernetes ...

[ERROR] Please login with valid credential to the container-registry.oracle.com/kubernetes

        # docker login container-registry.oracle.com/kubernetes

All logins checked (both oracle & github)

VBox + extensions updated (today)

What could be wrong?

BR!!!

Marzio Pulcini

Hello.

Thanks for sharing.


I receive the following error message:

/vagrant/scripts/kubeadm-setup-master.sh: Login to container-registry.oracle.com

Username (japablo@mercuritech.com):

Password:

Login Succeeded

/vagrant/scripts/kubeadm-setup-master.sh: Setup Master node -- be patient!

/vagrant/scripts/kubeadm-setup-master.sh: kubeadm-setup.sh did not complete successfully

Last lines of kubeadm-setup.log:

Starting to initialize master node ...

Checking if env is ready ...

Checking whether docker can pull busybox image ...

Checking access to container-registry.oracle.com/kubernetes ...

[ERROR] Please login with valid credential to the container-registry.oracle.com/kubernetes

        # docker login container-registry.oracle.com/kubernetes

All logins checked (both oracle & github)

VBox + extensions updated (today)

What could be wrong?

BR!!!

Hi, you should "manually" accept "Oracle Standard Terms and Restrictions" before trying to setup master node. Login with your credentials on https://container-registry.oracle.com/ , then enter "Container Services" business area. Click on "Continue" button to accept the license statement.

Go back to your environment and retry.

Best Regards,

Marzio

JAPi

Hi, you should "manually" accept "Oracle Standard Terms and Restrictions" before trying to setup master node. Login with your credentials on https://container-registry.oracle.com/ , then enter "Container Services" business area. Click on "Continue" button to accept the license statement.

Go back to your environment and retry.

Best Regards,

Marzio

Hello Marzio.

It works... perfect!!!, thanks.

[vagrant@master ~]$ kubectl cluster-info

Kubernetes master is running at https://192.168.99.100:6443

KubeDNS is running at https://192.168.99.100:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

[vagrant@master ~]$ kubectl get nodes

NAME                 STATUS    ROLES     AGE       VERSION

master.vagrant.vm    Ready     master    1h        v1.9.1+2.1.5.el7

worker1.vagrant.vm   Ready     <none>    17m       v1.9.1+2.1.5.el7

worker2.vagrant.vm   Ready     <none>    3m        v1.9.1+2.1.5.el7

[vagrant@master ~]$ kubectl get pods --namespace=kube-system

NAME                                        READY     STATUS    RESTARTS   AGE

etcd-master.vagrant.vm                      1/1       Running   0          1h

kube-apiserver-master.vagrant.vm            1/1       Running   0          1h

kube-controller-manager-master.vagrant.vm   1/1       Running   0          1h

kube-dns-855949bbf-mjmmx                    3/3       Running   0          1h

kube-flannel-ds-2zf2z                       1/1       Running   0          17m

kube-flannel-ds-6fm9t                       1/1       Running   0          3m

kube-flannel-ds-lf86k                       1/1       Running   0          1h

kube-proxy-596rh                            1/1       Running   0          1h

kube-proxy-bqwkp                            1/1       Running   0          17m

kube-proxy-tsjms                            1/1       Running   0          3m

kube-scheduler-master.vagrant.vm            1/1       Running   0          1h

kubernetes-dashboard-7c966ddf6d-cttgb       1/1       Running   0          1h

Best Regards!!!

3351553

It worked for me.

But after starting the master I had to execute :

[root@master vagrant]# sudo cp /etc/kubernetes/admin.conf $HOME/

[root@master vagrant]# sudo chown $(id -u):$(id -g) $HOME/admin.conf

[root@master vagrant]# export KUBECONFIG=$HOME/admin.conf

user7821493

Hello

I have done everiting like described but the "kubeadm-setup-master.sh" fails .... can someone help?

----------------------------------

[vagrant@master ~]$ su root

[root@master vagrant]# /vagrant/scripts/kubeadm-setup-master.sh

/vagrant/scripts/kubeadm-setup-master.sh: Login to container-registry.oracle.com

Username: marcus.juettner@elaxy.com

Password:

WARNING! Your password will be stored unencrypted in /root/.docker/config.json.

Configure a credential helper to remove this warning. See

https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

/vagrant/scripts/kubeadm-setup-master.sh: Setup Master node -- be patient!

/vagrant/scripts/kubeadm-setup-master.sh: kubeadm-setup.sh did not complete successfully

Last lines of kubeadm-setup.log:

Checking br_netfilter module ...

Checking sysctl variables ...

Enabling kubelet ...

Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /etc/systemd/system/kubelet.service.

Check successful, ready to run 'up' command ...

Waiting for kubeadm to setup master cluster...

Please wait ...

[ERROR] kubeadm init failed

invalid configuration: kind and apiVersion is mandatory information that needs to be specified in all YAML documents

[root@master vagrant]#

-----------------------------------------------------------

Bye

Marcus

Sergio-Oracle

Hello

I have done everiting like described but the "kubeadm-setup-master.sh" fails .... can someone help?

----------------------------------

[vagrant@master ~]$ su root

[root@master vagrant]# /vagrant/scripts/kubeadm-setup-master.sh

/vagrant/scripts/kubeadm-setup-master.sh: Login to container-registry.oracle.com

Username: marcus.juettner@elaxy.com

Password:

WARNING! Your password will be stored unencrypted in /root/.docker/config.json.

Configure a credential helper to remove this warning. See

https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

/vagrant/scripts/kubeadm-setup-master.sh: Setup Master node -- be patient!

/vagrant/scripts/kubeadm-setup-master.sh: kubeadm-setup.sh did not complete successfully

Last lines of kubeadm-setup.log:

Checking br_netfilter module ...

Checking sysctl variables ...

Enabling kubelet ...

Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /etc/systemd/system/kubelet.service.

Check successful, ready to run 'up' command ...

Waiting for kubeadm to setup master cluster...

Please wait ...

[ERROR] kubeadm init failed

invalid configuration: kind and apiVersion is mandatory information that needs to be specified in all YAML documents

[root@master vagrant]#

-----------------------------------------------------------

Bye

Marcus

See: https://github.com/oracle/vagrant-boxes/issues/114 for a solution.

user7821493

See: https://github.com/oracle/vagrant-boxes/issues/114 for a solution.

Thanx a lot  .... worked!

1 - 7
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
312 views