Comments Below.
>From: yilmaz <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: servlet access problem
>Date: Tue, 10 Apr 2001 21:40:26 +0800
>
>friends i am sorry for flooding your email boxes with my stupid questions
>but this problem is very important for me, and i just can't relax without
>solving this problem
>you can be sure that i will get quiet after i solve my problem :)
>please bear with me.
>
>i changed the webserver.xml file as follows: ( as suggested by jiger and
>robert)
><WebApplication id="wapservlets" mapping="/user/staff/wapteam"
> docBase="user/staff/wapteam" maxInactiveInterval="30" />
>my servlets stays under this path
>/user/staff/wapteam/wap/servlets/
>and i use the following url to access my servlets.
>http://140.124.13.4:8080/wapservlets/wap/servlet/HelloWorldExample
>so far is there any mistake?
Ya a Lot. See yilmaz u r not understanding that an id is not the path it is
just a name u give to identify. The main things are mappings & docBase.
if u r storing ur servlets under /user/staff/wapteam then this is the
docBase ok. & if you want a smaller name for your context then u give it a
mapping. You will create the Web-Inf etc classes below /user/staff/wapteam.
so ideally your entire cofig. should be.
<WebApplication id="wapservlets" mapping="/mywaps"
docBase="user/staff/wapteam" maxInactiveInterval="30" />
then call the servlets like this
http://myhost:8080/mywaps/servlet/mywapservlet
if u r storing under some other directory then it should be called as
http://myhost:8080/mywaps/servlet/somedir/mywapservlet
thats it. dont make things complicated else it will screw up ur entire
project.
Bye,
Jiger
>if not then why on earth my servlet doesn't pop up in my window?
>the example servlet HelloWorldExample under /usr/jswdk1.0.1/examples/
>can be executed with the following url:
>http://140.124.13.4:8080/examples/servlet/HelloWorldExample
>
>thanks a lot.
>cheers.
>
>
>
>
> > is this correct?
> > <WebApplication id="wapservlets" mapping="/user/staff/wapteam"
> > docBase="user/staff/wapteam" maxInactiveInterval="30" />
> >
> > before making our administrator angry, i just want to be sure?
> >
> > thanks :)
> >
>
> > > Hi yilmaz,
> > > It is obvious that u r getting error. Just swap
> > > /user/staff/wapteam from mappings to docBase & ur problem will be
>solved.
> > >
> > > Bye,
> > > Jiger
> > >
> > >
> > > > > >
> > > >HI EVERYBODY!
> > > >last time (some) friends gave me a kind reply for my
> > > >problem.
> > > >my problem is :I want to use my own directory (which
> > > >is located at /user/staff/wapteam)
> > > >as the servlet root, so that i can easily upload,
> > > >download and modify my the servlets.
> > > >and our campus server uses javaserver web dev kit as
> > > >servlet server and it is located at /usr/jwsdk1.0.1
> > > >as my friends suggested, i added the directory name
> > > >into the webserver.xml file.
> > > >i asked the server administrator to add the following
> > > >line to the webserver.xml file:
> > > ><WebApplication id="wapservlets"
> > > >mapping="/user/staff/wapteam" docBase="wap"
> > > >maxInactiveInterval="30" />
> > > >where /user/staff/wapteam is the full path to my
> > > >directory.
> > > >for reference i put the whole webserver.xml content at
> > > >the bottom
> > > >now my problem is : i still can't access my sample
> > > >HelloWorldExample servlet which is located under
> > > >/wap/servlets directory
> > > >i use the following URL to access that servlet
> > > >http://140.124.13.4:8080/wapservlets/wap/servlet/HelloWorldExample
> > > >
> > > >i also used several other probable addresses but in
> > > >vain.
> > > >i can't access. What is wrong with this location?
> > > >CAN SOMEONE TELL ME HOW SHOULD I ACCESS TO MY
> > > >SERVLETS?
> > > >THANKS A LOT IN ADVANCE :)
> > > >YILMAZ AY
> > > >REGARDS
> > > >
> > > ><!DOCTYPE WebServer (View Source for full doctype...)>
> > > >
> > > >- <WebServer id="webServer">
> > > >- <Service id="service0" hostName="dbs.cc.ntut.edu.tw"
> > > >port="8080" inet="140.124.13.4" docBase="webpages"
> > > >workDir="work" workDirIsPersistent="false">
> > > > <WebApplication id="examples" mapping="/examples"
> > > >docBase="examples" maxInactiveInterval="30" />
> > > > <WebApplication id="wapservlets"
> > > >mapping="/user/staff/wapteam" docBase="wap"
> > > >maxInactiveInterval="30" />
> > > > <WebApplication id="roy" mapping="/roy"
> > > >docBase="roy" maxInactiveInterval="30" />
> > > > <WebApplication id="dumy" mapping="/.."
> > > >docBase="dumy/dumy/dumy/dumy/dumy/dumy/dumy/dumy/dumy/dumy/dumy/dumy"
> > > >maxInactiveInterval="30" />
> > > > </Service>
> > > > </WebServer>
> > > >
> > > >__________________________________________________
> > > >Do You Yahoo!?
> > > >Get email at your own domain with Yahoo! Mail.
> > > >http://personal.mail.yahoo.com/
> > > >
> > >
> >
> >___________________________________________________________________________
> > > >To unsubscribe, send email to [EMAIL PROTECTED] and include in
>the
> > body
> > > >of the message "signoff SERVLET-INTEREST".
> > > >
> > > >Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > >Resources:
>http://java.sun.com/products/servlet/external-resources.html
> > > >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > >
> > >
>_________________________________________________________________________
> > > Get Your Private, Free E-mail from MSN Hotmail at
>http://www.hotmail.com.
> > >
> > >
> >
>___________________________________________________________________________
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources:
>http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > >
> >
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html