You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ma...@yahoo.com on 2003/06/18 01:51:23 UTC

newbie - program structure

ok, I am used to Java and PHP and had a question about
where to put jsp/servlet code. what is the best thing
to do?

I am used to just putting it anywhere I want as long
as I sperate it how I would like BUt with jsp it seems
you need to tell it the actual folders the jsp is in.

what I was looking for is like, here is my normal web
page strucutre, full of sub dirs.

/path/to/my/www/root/index.html et al

when I see a jsp file, to send to tomcat.

is this possible, I am not sure how the magic happens.

where does the jsp file go? in the normal www
structure and the processing is passed on that file to
the tomcat process for execution, correct?

I don't see how to set it up recurvisly it does not
seem to work? I know I can do *.jsp etc.

Thanks

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: newbie - program structure

Posted by ma...@yahoo.com.
never mind, there are two sets of examples!

doh!

sorry.

--- madhombre@yahoo.com wrote:
> I guess I am confused.
> 
> I set up my workers2.properties to link to
> /exmaples/jsp/*
> 
> then when I type in the ip/port of myu web server
> (NOT
> tomcat) /examples/jsp/dates/dates.jsp for example it
> comes up.
> 
> SO
> 
> I thought hey, you don't I copy an example into my
> main www dir and see if that works.
> 
> for some reason there are no jsp files in the
> examples, they are all .java and .class.  now I do
> use
> java files but I guess they do not actually in it is
> called by an htnl doc so not a big deal BUT why are
> these no .jsp? I searched all the examples/jsp and
> found no .jsp.
> 
> what the heck is going on?
> 
> correct me if I am wrong...
> what it seems to be is that when you set say
> /examples/jsp/*
> 
> that is then placed into the tomcat path. so if I
> wanted to branch out my own stuff, I would need to
> add
> a dir somewhere (I can look into that) and then link
> to that, I guess jsp does not like the company of
> other stuff, just likes to be on it's own.
> 
> still a little confused, and the file extensions!
> ???
> 
> 
> 
> 
> --- madhombre@yahoo.com wrote:
> > ok, I am used to Java and PHP and had a question
> > about
> > where to put jsp/servlet code. what is the best
> > thing
> > to do?
> > 
> > I am used to just putting it anywhere I want as
> long
> > as I sperate it how I would like BUt with jsp it
> > seems
> > you need to tell it the actual folders the jsp is
> > in.
> > 
> > what I was looking for is like, here is my normal
> > web
> > page strucutre, full of sub dirs.
> > 
> > /path/to/my/www/root/index.html et al
> > 
> > when I see a jsp file, to send to tomcat.
> > 
> > is this possible, I am not sure how the magic
> > happens.
> > 
> > where does the jsp file go? in the normal www
> > structure and the processing is passed on that
> file
> > to
> > the tomcat process for execution, correct?
> > 
> > I don't see how to set it up recurvisly it does
> not
> > seem to work? I know I can do *.jsp etc.
> > 
> > Thanks
> > 
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: newbie - program structure

Posted by ma...@yahoo.com.
I see, thanks, very enlightning.

ok, so I want to create my own directory for my
applications as a root and then have my apps under
here.

I set this up in my server.xml file first correct?
then I can reference this in the workers2.properties.

I notice that the workers2.properties can be changed
on the fly, can the server.xml? (I am unwilling to try
due to potential issues. but it seems to state that
each app should have it's own entry in the server.xml
file? surely you should not need to restart the server
to add an application in?

so I am looking at server.xml and I see the examples
bit set up, but it is a little confusing

I see this ->

Define properties for each web application.  This is
only needed if you want to set non-default properties,
or have web application document roots in places other
than the virtual host's appBase directory.  

I see the examples section in there BUT what is the
best way to add my application ROOT?

thanks
--- Yoav Shapira <yo...@yahoo.com> wrote:
> Howdy,
> If you're just starting out with
> servlets/JSPs/webapps, follow the app
> developer's guide instead of forming bad habits ;) 
> It's here:
>
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html
> 
> Don't worry about Apache front-end and JK or other
> connectors for now.  Just
> develop, deploy, test on tomcat-standalone first. 
> You'll likely find that the
> performance, including for static resources, is
> sufficient for your needs.
> 
> Yoav Shapira
> 
> 
> --- madhombre@yahoo.com wrote:
> > I guess I am confused.
> > 
> > I set up my workers2.properties to link to
> > /exmaples/jsp/*
> > 
> > then when I type in the ip/port of myu web server
> (NOT
> > tomcat) /examples/jsp/dates/dates.jsp for example
> it
> > comes up.
> > 
> > SO
> > 
> > I thought hey, you don't I copy an example into my
> > main www dir and see if that works.
> > 
> > for some reason there are no jsp files in the
> > examples, they are all .java and .class.  now I do
> use
> > java files but I guess they do not actually in it
> is
> > called by an htnl doc so not a big deal BUT why
> are
> > these no .jsp? I searched all the examples/jsp and
> > found no .jsp.
> > 
> > what the heck is going on?
> > 
> > correct me if I am wrong...
> > what it seems to be is that when you set say
> > /examples/jsp/*
> > 
> > that is then placed into the tomcat path. so if I
> > wanted to branch out my own stuff, I would need to
> add
> > a dir somewhere (I can look into that) and then
> link
> > to that, I guess jsp does not like the company of
> > other stuff, just likes to be on it's own.
> > 
> > still a little confused, and the file extensions!
> ???
> > 
> > 
> > 
> > 
> > --- madhombre@yahoo.com wrote:
> > > ok, I am used to Java and PHP and had a question
> > > about
> > > where to put jsp/servlet code. what is the best
> > > thing
> > > to do?
> > > 
> > > I am used to just putting it anywhere I want as
> long
> > > as I sperate it how I would like BUt with jsp it
> > > seems
> > > you need to tell it the actual folders the jsp
> is
> > > in.
> > > 
> > > what I was looking for is like, here is my
> normal
> > > web
> > > page strucutre, full of sub dirs.
> > > 
> > > /path/to/my/www/root/index.html et al
> > > 
> > > when I see a jsp file, to send to tomcat.
> > > 
> > > is this possible, I am not sure how the magic
> > > happens.
> > > 
> > > where does the jsp file go? in the normal www
> > > structure and the processing is passed on that
> file
> > > to
> > > the tomcat process for execution, correct?
> > > 
> > > I don't see how to set it up recurvisly it does
> not
> > > seem to work? I know I can do *.jsp etc.
> > > 
> > > Thanks
> > > 
> > > __________________________________
> > > Do you Yahoo!?
> > > SBC Yahoo! DSL - Now only $29.95 per month!
> > > http://sbc.yahoo.com
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > tomcat-user-help@jakarta.apache.org
> > > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> > 
> 
> 
> =====
> Yoav Shapira
> yoavs@computer.org
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: newbie - program structure

Posted by Yoav Shapira <yo...@yahoo.com>.
Howdy,
If you're just starting out with servlets/JSPs/webapps, follow the app
developer's guide instead of forming bad habits ;)  It's here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html

Don't worry about Apache front-end and JK or other connectors for now.  Just
develop, deploy, test on tomcat-standalone first.  You'll likely find that the
performance, including for static resources, is sufficient for your needs.

Yoav Shapira


--- madhombre@yahoo.com wrote:
> I guess I am confused.
> 
> I set up my workers2.properties to link to
> /exmaples/jsp/*
> 
> then when I type in the ip/port of myu web server (NOT
> tomcat) /examples/jsp/dates/dates.jsp for example it
> comes up.
> 
> SO
> 
> I thought hey, you don't I copy an example into my
> main www dir and see if that works.
> 
> for some reason there are no jsp files in the
> examples, they are all .java and .class.  now I do use
> java files but I guess they do not actually in it is
> called by an htnl doc so not a big deal BUT why are
> these no .jsp? I searched all the examples/jsp and
> found no .jsp.
> 
> what the heck is going on?
> 
> correct me if I am wrong...
> what it seems to be is that when you set say
> /examples/jsp/*
> 
> that is then placed into the tomcat path. so if I
> wanted to branch out my own stuff, I would need to add
> a dir somewhere (I can look into that) and then link
> to that, I guess jsp does not like the company of
> other stuff, just likes to be on it's own.
> 
> still a little confused, and the file extensions! ???
> 
> 
> 
> 
> --- madhombre@yahoo.com wrote:
> > ok, I am used to Java and PHP and had a question
> > about
> > where to put jsp/servlet code. what is the best
> > thing
> > to do?
> > 
> > I am used to just putting it anywhere I want as long
> > as I sperate it how I would like BUt with jsp it
> > seems
> > you need to tell it the actual folders the jsp is
> > in.
> > 
> > what I was looking for is like, here is my normal
> > web
> > page strucutre, full of sub dirs.
> > 
> > /path/to/my/www/root/index.html et al
> > 
> > when I see a jsp file, to send to tomcat.
> > 
> > is this possible, I am not sure how the magic
> > happens.
> > 
> > where does the jsp file go? in the normal www
> > structure and the processing is passed on that file
> > to
> > the tomcat process for execution, correct?
> > 
> > I don't see how to set it up recurvisly it does not
> > seem to work? I know I can do *.jsp etc.
> > 
> > Thanks
> > 
> > __________________________________
> > Do you Yahoo!?
> > SBC Yahoo! DSL - Now only $29.95 per month!
> > http://sbc.yahoo.com
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> > 
> 
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


=====
Yoav Shapira
yoavs@computer.org

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: newbie - program structure

Posted by ma...@yahoo.com.
I guess I am confused.

I set up my workers2.properties to link to
/exmaples/jsp/*

then when I type in the ip/port of myu web server (NOT
tomcat) /examples/jsp/dates/dates.jsp for example it
comes up.

SO

I thought hey, you don't I copy an example into my
main www dir and see if that works.

for some reason there are no jsp files in the
examples, they are all .java and .class.  now I do use
java files but I guess they do not actually in it is
called by an htnl doc so not a big deal BUT why are
these no .jsp? I searched all the examples/jsp and
found no .jsp.

what the heck is going on?

correct me if I am wrong...
what it seems to be is that when you set say
/examples/jsp/*

that is then placed into the tomcat path. so if I
wanted to branch out my own stuff, I would need to add
a dir somewhere (I can look into that) and then link
to that, I guess jsp does not like the company of
other stuff, just likes to be on it's own.

still a little confused, and the file extensions! ???




--- madhombre@yahoo.com wrote:
> ok, I am used to Java and PHP and had a question
> about
> where to put jsp/servlet code. what is the best
> thing
> to do?
> 
> I am used to just putting it anywhere I want as long
> as I sperate it how I would like BUt with jsp it
> seems
> you need to tell it the actual folders the jsp is
> in.
> 
> what I was looking for is like, here is my normal
> web
> page strucutre, full of sub dirs.
> 
> /path/to/my/www/root/index.html et al
> 
> when I see a jsp file, to send to tomcat.
> 
> is this possible, I am not sure how the magic
> happens.
> 
> where does the jsp file go? in the normal www
> structure and the processing is passed on that file
> to
> the tomcat process for execution, correct?
> 
> I don't see how to set it up recurvisly it does not
> seem to work? I know I can do *.jsp etc.
> 
> Thanks
> 
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org