• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

cant setup my own working environment

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi friends,

I've been trying far many days to set my own web development working environment. although, all the formalities have been done however, I'm still unable to deploy it.

below is the summery of the steps I've taken

1- created an webapps development directory named OnlineExam.
2- Organiged this directory in proper webapp format.
OnlineExam/WEB-INF/
................../lib- jar files
................../classes- java class files

OnlineExam/--web pages(jsp,html)

3- put OnlineExam directory inside ${CATALINA_HOME}/server/webapps/
4- created OnlineExam.xml file with context element pointing to app directory and put this OnlineExam.xml file inside ${CATALINA_HOME}/conf/Catalina/localhost/ directory.



5- put a copy of OnlineExam.xml inside my app directory also.

6- changed the connector port from 8080 to 80.
7- set the classpath variable pointing to app directory.

and finally I've given the following URL for a webpage
http://localhost/Editpage.jsp

but tomcat given error: cant find resource Editpage.jsp

is there anything left to do?
tomcat 5.5.17

regards
san
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

3- put OnlineExam directory inside ${CATALINA_HOME}/server/webapps/

Wrong place. Should be${CATALINA_HOME}/webapps/
 
santomh Mclain
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've tried in this way already but couldn't find it working.
i got stuck on this problem.

regards
san
 
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
With the configuration above isn't the right url to access the application this?
http://localhost/OnlineExam/Editpage.jsp

If you are trying to point it to the root (without the application name in the pathname) then you should say so explicitly. Don't know how though. Maybe by using empty name like ".xml" or perhaps "ROOT.xml" or something like that...
 
santomh Mclain
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
gosh!!
what a minor mistake i was making

but one more interesting issue i have seen. that is, after putting app directory inside $CATALINA_HOME/webapps/ there is no need of OnlineExam.xml file and this make me suspect that there must be some default setting.

is that so?
[ July 07, 2008: Message edited by: santomh Mclain ]
 
Ilari Moilanen
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
True. What caught first my eye in your posting was that you seemed to do everything a little too complicated. You need the separate xml file only if you need to do something special trickery like point outside tomcat directory hierarchy.

Every application you put in the webapps dir is automatically used by tomcat. You can even (and that is the normal procedure in my opinion) place a war packaged application there and tomcat will automatically deploy it there...

[ July 07, 2008: Message edited by: Ilari Moilanen ]
[ July 07, 2008: Message edited by: Ilari Moilanen ]
 
santomh Mclain
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
though at first, I'd put the app directory at different drive(E:\) other than tomcat installation drive(C:\) and given the full path (E:\java\OnlineExam) to the context element in OnlineExam.xml located at where it should be.
but I couldn't deploy because of the same error. all the same steps I'd taken for this.

what may be the reason?
 
Ilari Moilanen
Ranch Hand
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You probably have looked through the docs that are bundled with tomcat? Like
http://localhost:8080/tomcat-docs/manager-howto.html
or if you were using port 80 then
http://localhost/tomcat-docs/manager-howto.html

But what seems to be missing from the context declaration you gave in your first message is the path attribute. So maybe try adding
path="/OnlineExam"
there...
 
santomh Mclain
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes!!!
i got it worked
thanks a lot buddy, you really solved the problem I was stuck in over so long.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic