You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Guddu Kumar <na...@yahoo.com> on 2001/12/06 20:50:44 UTC

Help on Setting Up Application

Hi,
I have to setup tomcat for an my application.

Basically i am using MVC2 Design pattern for the
application. That means i have a Controlservlet which
is to be called on every request. 

I have defined the context path in server.xml as
path="/myapp" and docbase="webapps/myapp".

I have to put my servlet in certain package structure
like web-inf/classes/1/2/3/4. I am not able to run my
Controlservlet if i put it in package structure. 

My question is I want to access that ControlServlet
which is in that package structure and it should be
called when my url is http://localhost:8080/myapp.
Thanks
Guddu


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Help on Setting Up Application

Posted by Jim Urban <ji...@netsteps.net>.
Sounds like you need to set up servlet mapping in your context web.xml.

Jim

-----Original Message-----
From: Guddu Kumar [mailto:nav_varu@yahoo.com]
Sent: Thursday, December 06, 2001 1:51 PM
To: tomcat-user@jakarta.apache.org
Subject: Help on Setting Up Application


Hi,
I have to setup tomcat for an my application.

Basically i am using MVC2 Design pattern for the
application. That means i have a Controlservlet which
is to be called on every request. 

I have defined the context path in server.xml as
path="/myapp" and docbase="webapps/myapp".

I have to put my servlet in certain package structure
like web-inf/classes/1/2/3/4. I am not able to run my
Controlservlet if i put it in package structure. 

My question is I want to access that ControlServlet
which is in that package structure and it should be
called when my url is http://localhost:8080/myapp.
Thanks
Guddu


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Help on Setting Up Application

Posted by Guddu Kumar <na...@yahoo.com>.
hi I have tried this option but it gives error
--- Jim Urban <ji...@netsteps.net> wrote:
> If your package is 1.2.3.4 and your servlet name is
> Controlservlet and it is
> in context myapp and you want to be able to access
> your servlet by simply
> entering http://host/myapp here is what you need to
> put in your
> myapp/WEB-INF/web.xml file.
> 
> <web-app>
> 	<servlet>
> 		  <servlet-name>Controlservlet</servlet-name>
> 		 
>
<servlet-class>1.2.3.4.Controlservlet</servlet-class>
> 	</servlet>
> 	<servlet-mapping>
> 		<servlet-name>Controlservlet</servlet-name>
> 		<url-pattern>/*</url-pattern>
> 	</servlet-mapping>
> ....
> 
> Hope this helps,
> 
> Jim
> 
> -----Original Message-----
> From: Guddu Kumar [mailto:nav_varu@yahoo.com]
> Sent: Thursday, December 06, 2001 4:23 PM
> To: Tomcat Users List
> Subject: Help on Setting Up Application
> 
> 
> Hi Jim
> Can u let me know the changes in web.xml
> --- Guddu Kumar <na...@yahoo.com> wrote:
> > Hi,
> > I have to setup tomcat for an my application.
> >
> > Basically i am using MVC2 Design pattern for the
> > application. That means i have a Controlservlet
> > which
> > is to be called on every request.
> >
> > I have defined the context path in server.xml as
> > path="/myapp" and docbase="webapps/myapp".
> >
> > I have to put my servlet in certain package
> > structure
> > like web-inf/classes/1/2/3/4. I am not able to run
> > my
> > Controlservlet if i put it in package structure.
> >
> > My question is I want to access that
> ControlServlet
> > which is in that package structure and it should
> be
> > called when my url is http://localhost:8080/myapp.
> > Thanks
> > Guddu
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send your FREE holiday greetings online!
> > http://greetings.yahoo.com
> >
> > --
> > To unsubscribe:
> >
> <ma...@jakarta.apache.org>
> > For additional commands:
> > <ma...@jakarta.apache.org>
> > Troubles with the list:
> > <ma...@jakarta.apache.org>
> >
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
> 
> --
> To unsubscribe:  
> <ma...@jakarta.apache.org>
> For additional commands:
> <ma...@jakarta.apache.org>
> Troubles with the list:
> <ma...@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe:  
> <ma...@jakarta.apache.org>
> For additional commands:
> <ma...@jakarta.apache.org>
> Troubles with the list:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Help on Setting Up Application

Posted by Jim Urban <ji...@netsteps.net>.
If your package is 1.2.3.4 and your servlet name is Controlservlet and it is
in context myapp and you want to be able to access your servlet by simply
entering http://host/myapp here is what you need to put in your
myapp/WEB-INF/web.xml file.

<web-app>
	<servlet>
		  <servlet-name>Controlservlet</servlet-name>
		  <servlet-class>1.2.3.4.Controlservlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>Controlservlet</servlet-name>
		<url-pattern>/*</url-pattern>
	</servlet-mapping>
....

Hope this helps,

Jim

-----Original Message-----
From: Guddu Kumar [mailto:nav_varu@yahoo.com]
Sent: Thursday, December 06, 2001 4:23 PM
To: Tomcat Users List
Subject: Help on Setting Up Application


Hi Jim
Can u let me know the changes in web.xml
--- Guddu Kumar <na...@yahoo.com> wrote:
> Hi,
> I have to setup tomcat for an my application.
>
> Basically i am using MVC2 Design pattern for the
> application. That means i have a Controlservlet
> which
> is to be called on every request.
>
> I have defined the context path in server.xml as
> path="/myapp" and docbase="webapps/myapp".
>
> I have to put my servlet in certain package
> structure
> like web-inf/classes/1/2/3/4. I am not able to run
> my
> Controlservlet if i put it in package structure.
>
> My question is I want to access that ControlServlet
> which is in that package structure and it should be
> called when my url is http://localhost:8080/myapp.
> Thanks
> Guddu
>
>
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
>
> --
> To unsubscribe:
> <ma...@jakarta.apache.org>
> For additional commands:
> <ma...@jakarta.apache.org>
> Troubles with the list:
> <ma...@jakarta.apache.org>
>


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Help on Setting Up Application

Posted by Guddu Kumar <na...@yahoo.com>.
Hi Jim
Can u let me know the changes in web.xml
--- Guddu Kumar <na...@yahoo.com> wrote:
> Hi,
> I have to setup tomcat for an my application.
> 
> Basically i am using MVC2 Design pattern for the
> application. That means i have a Controlservlet
> which
> is to be called on every request. 
> 
> I have defined the context path in server.xml as
> path="/myapp" and docbase="webapps/myapp".
> 
> I have to put my servlet in certain package
> structure
> like web-inf/classes/1/2/3/4. I am not able to run
> my
> Controlservlet if i put it in package structure. 
> 
> My question is I want to access that ControlServlet
> which is in that package structure and it should be
> called when my url is http://localhost:8080/myapp.
> Thanks
> Guddu
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
> 
> --
> To unsubscribe:  
> <ma...@jakarta.apache.org>
> For additional commands:
> <ma...@jakarta.apache.org>
> Troubles with the list:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>