You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Keith Wong <ke...@marchFIRST.com> on 2001/01/19 02:03:34 UTC

servlets path?? HELP PLZ

Hi All thanks for reading my question.

i have the situation in here.  i like to setup the jsp page and servlet in
difference folder of tomcat.

i like to put the servlets into:
TOMCAT_HOME\webapps\myAccounts\WEB-INF\classes\servlets\myServlet.java

and JSP pages in 
TOMCAT_HOME\webapps\myAccounts\jsp\myJSP.jsp
JSP's form tag is <form method=POST ACTION=myServlet>

web.xml:
<web-app>
    <servlet>
        <servlet-name>myServlet</servlet-name>
        <servlet-class>myServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>myServlet</servlet-name>
        <url-pattern>servlets/myServlet</url-pattern>
    </servlet-mapping>
    <taglib>

server.xml:
        <Context path="/myAccounts" docBase="D:/myAccounts" debug="0"
reloadable="true" > 
        </Context>

and i got this error
Error: 404
Location: /myAccounts/jsp/myServlet
File Not Found
/myAccounts/jsp/myServlet


i tested the tomcat's examples and all jsps and html under
TOMCAT_HOME\webapps\myAccounts\WEB-INF, all of those are woking good.

env.: tomcat3.2.1 w NT4

is any idea that i can archive that? thanks for any help

Keith

Re: website (Re: general@jakarta.apache.org)

Posted by Peter Donald <do...@apache.org>.
At 12:56  27/1/01 -0800, Jon Stevens wrote:
>>>> does that mean that a notice will be posted when a change is commited?
>>> 
>>> jakarta-site-cvs-subscribe@jakarta.apache.org
>> 
>> cool!
>> when is this list going to be available? i've tried to subscribe and i'm
>> getting
>> bounced?
>> 
>> - robert
>
>What are you talking about? This list has been available for about 1.5 years
>now. What bounce message?

I believe you gave the wrong address - it is not

jakarta-site-cvs-subscribe@jakarta.apache.org

but

site-cvs-subscribe@jakarta.apache.org


Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


Re: [PATCH] jakarta-site2/xdocs/site/library.xml

Posted by Peter Donald <do...@apache.org>.
At 05:28  3/2/01 +0000, Robert Burrell Donkin wrote:
>this patch corrects broken links (the cvs stuff on www.cyclic.com has
moved onto www.cvshome.org).

Both patches applied - thanks ;)


Cheers,

Pete

*-----------------------------------------------------*
| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |
*-----------------------------------------------------*


[PATCH] jakarta-site2/xdocs/site/library.xml

Posted by Robert Burrell Donkin <Ro...@appleonline.net>.
this patch corrects broken links (the cvs stuff on www.cyclic.com has moved onto www.cvshome.org).

- robert

[PATCH] jakarta-site2/xdocs/site/mail2.xml

Posted by Robert Burrell Donkin <Ro...@appleonline.net>.
Jon Stevens wrote:

> on 1/30/01 2:48 PM, "Robert Burrell Donkin" <Ro...@appleonline.net>
> wrote:
>
> > OK. here's a diff -u patch based on assumptions above.
>
> Thanks, but you didn't read the documentation.
>
> <http://jakarta.apache.org/site/jakarta-site2.html>

yep (can't surf much on weekdays).

i've (hopefully) got everything set up ok now. so here's that patch for
mail2.xml.
it adds subscription details for the site cvs list under the documentation
section and fixes two typos.

fingers crossed.
- robert

Re: [PATCH] Re: website (Re: general@jakarta.apache.org)

Posted by Jon Stevens <jo...@latchkey.com>.
on 1/30/01 2:48 PM, "Robert Burrell Donkin" <Ro...@appleonline.net>
wrote:

> i take it that there isn't a list where changes to the site are discussed,
> just
> the commit list (site-cvs-subscribe@jakarta.apache.org +
> site-cvs-unsubscribe@jakarta.apache.org). i guess it belongs under
> documentation.

Changes to the site are discussed here on this list.

> OK. here's a diff -u patch based on assumptions above.

Thanks, but you didn't read the documentation.

<http://jakarta.apache.org/site/jakarta-site2.html>

The site .html files are generated from the .xml files. You should send
diff's on the .xml files, not the .html files.

> on the subject of jakarta html docs, are the guildlines for submitting
> documentation patchs the same as for code patches (ie. diff -u new old)

Yes.

> (i have a bug fix for a turbine document)?

Please submit it to the turbine list or send it privately to me, I will
check it in. FYI, Turbine depends on the Jakarta-site2 module as well,
therefore the instructions for modifying the .xml files are the same.

thanks,

-jon


[PATCH] Re: website (Re: general@jakarta.apache.org)

Posted by Robert Burrell Donkin <Ro...@appleonline.net>.
Jon Stevens wrote:

> No, you aren't being daft, but unless you show me the error message in the
> first place, I can't figure out what is going wrong...now I know the error,
> now I can help you. Simple eh?

OK. point taken.

> It would be great if someone would send me a diff for the mail2.html page
> that adds this list to the page.

i can manage a bit of cutting and pasting if there's no one else who wants to jump
in here.

i take it that there isn't a list where changes to the site are discussed,  just
the commit list (site-cvs-subscribe@jakarta.apache.org +
site-cvs-unsubscribe@jakarta.apache.org). i guess it belongs under documentation.
OK. here's a diff -u patch based on assumptions above.

on the subject of jakarta html docs, are the guildlines for submitting
documentation patchs the same as for code patches (ie. diff -u new old)
(i have a bug fix for a turbine document)?

- robert



Re: website (Re: general@jakarta.apache.org)

Posted by Jon Stevens <jo...@latchkey.com>.
on 1/28/01 2:26 PM, "Robert Burrell Donkin" <Ro...@appleonline.net>
wrote:

> Jon Stevens wrote:
>> 
>> What are you talking about? This list has been available for about 1.5 years
>> now. What bounce message?
> 
> i am being daft?
> when i try to send a message to jakarta-site-cvs-subscribe@jakarta.apache.org
> i
> get
> 
>> Hi. This is the qmail-send program at apache.org.
>> I'm afraid I wasn't able to deliver your message to the following addresses.
>> This is a permanent error; I've given up. Sorry it didn't work out.
>> 
>> <ja...@jakarta.apache.org>:
>> Sorry, no mailbox here by that name. (#5.1.1)
> 
> back
> 
> - robert

No, you aren't being daft, but unless you show me the error message in the
first place, I can't figure out what is going wrong...now I know the error,
now I can help you. Simple eh?

I have asked Brian to setup an alias so that the address that I gave out
would work as well. I don't think it has been done yet.

However, as others have pointed out...the correct address is:

site-cvs-subscribe@jakarta.apache.org

I apologize for giving out the wrong address in the first place.

It would be great if someone would send me a diff for the mail2.html page
that adds this list to the page.

thanks,

-jon

-- 
Honk if you love peace and quiet.


Re: website (Re: general@jakarta.apache.org)

Posted by Robert Burrell Donkin <Ro...@appleonline.net>.
Jon Stevens wrote:

>
> What are you talking about? This list has been available for about 1.5 years
> now. What bounce message?

i am being daft?
when i try to send a message to jakarta-site-cvs-subscribe@jakarta.apache.org i
get

>Hi. This is the qmail-send program at apache.org.
>I'm afraid I wasn't able to deliver your message to the following addresses.
>This is a permanent error; I've given up. Sorry it didn't work out.
>
><ja...@jakarta.apache.org>:
>Sorry, no mailbox here by that name. (#5.1.1)

back

- robert


Re: website (Re: general@jakarta.apache.org)

Posted by Jon Stevens <jo...@latchkey.com>.
on 1/27/01 3:31 AM, "Robert Burrell Donkin" <Ro...@appleonline.net>
wrote:

> 
> 
> Jon Stevens wrote:
> 
>> on 1/24/01 1:20 PM, "Robert Burrell Donkin" <Ro...@appleonline.net>
>> wrote:
>> 
>>> does that mean that a notice will be posted when a change is commited?
>> 
>> jakarta-site-cvs-subscribe@jakarta.apache.org
> 
> cool!
> when is this list going to be available? i've tried to subscribe and i'm
> getting
> bounced?
> 
> - robert

What are you talking about? This list has been available for about 1.5 years
now. What bounce message?

-jon

-- 
Honk if you love peace and quiet.



Re: website (Re: general@jakarta.apache.org)

Posted by Robert Burrell Donkin <Ro...@appleonline.net>.

Jon Stevens wrote:

> on 1/24/01 1:20 PM, "Robert Burrell Donkin" <Ro...@appleonline.net>
> wrote:
>
> > does that mean that a notice will be posted when a change is commited?
>
> jakarta-site-cvs-subscribe@jakarta.apache.org

cool!
when is this list going to be available? i've tried to subscribe and i'm getting
bounced?

- robert



Re: website (Re: general@jakarta.apache.org)

Posted by Jon Stevens <jo...@latchkey.com>.
on 1/24/01 1:20 PM, "Robert Burrell Donkin" <Ro...@appleonline.net>
wrote:

> does that mean that a notice will be posted when a change is commited?
> i (for one) have to pay for internet by the minute and so it'd be useful to
> know
> when it's worth checking out the site.
> 
> - robert

jakarta-site-cvs-subscribe@jakarta.apache.org

-jon

-- 
Honk if you love peace and quiet.



Re: website (Re: general@jakarta.apache.org)

Posted by Robert Burrell Donkin <Ro...@appleonline.net>.
Jon Stevens wrote:

> p.s. The website is checked into CVS and we welcome patches.

does that mean that a notice will be posted when a change is commited?
i (for one) have to pay for internet by the minute and so it'd be useful to know
when it's worth checking out the site.

- robert



Re: general@jakarta.apache.org (was Re:library directory)

Posted by Jon Stevens <jo...@latchkey.com>.
on 1/22/01 1:21 PM, "Robert Burrell Donkin" <Ro...@appleonline.net>
wrote:

> if changing the name isn't a good idea, then maybe put something on the
> website
> like huge flashing red letters shouting QUESTIONS ABOUT USING AN APP SHOULD BE
> ASKED ON THE APP-USER LIST YOU STOOPID ASS ;-)
> 
> - robert

That is why I updated the description of the list a few days ago to attempt
to push people in the right directions...

<http://jakarta.apache.org/cvsweb/index.cgi/jakarta-site2/xdocs/site/mail.xm
l.diff?r1=1.6&r2=1.7>

It is in bold letters.

However, as you just clearly demonstrated, adding that to the site doesn't
make a difference as people (like yourself) still don't read it. :-)

p.s. The website is checked into CVS and we welcome patches.

-jon


Re: general@jakarta.apache.org (was Re:library directory)

Posted by Robert Burrell Donkin <Ro...@appleonline.net>.

Jon Stevens wrote:

> on 1/22/01 11:51 AM, "Robert Burrell Donkin" <Ro...@appleonline.net>
> wrote:
>
> > why not start a new list (for example policy@jakarta.apache.org) to handle
> > discussions about the whole project (ie. it's intended use) and get rid of
> > this
> > list entirely (or find some other use for it which is more in line with how
> > it's
> > actually been used)?
> >
> > - robert
>
> Nope. Read the description of the list again.

my point is that whilst i know what the list should be used for, past experience
has proved that this list is used mostly for questions which belong elsewhere.

telling everybody who asks a question on this list that they'd be better off
elsewhere sounds like a lot of hassle to me and probably involves being a little
offensive to a lot of people.

all these people going wrong suggests that it'd be worth looking at why it
happens. maybe they look at the name of the list and don't read the description.
if changing the name isn't a good idea, then maybe put something on the website
like huge flashing red letters shouting QUESTIONS ABOUT USING AN APP SHOULD BE
ASKED ON THE APP-USER LIST YOU STOOPID ASS ;-)

- robert


Re: general@jakarta.apache.org (was Re:library directory)

Posted by Jon Stevens <jo...@latchkey.com>.
on 1/22/01 11:51 AM, "Robert Burrell Donkin" <Ro...@appleonline.net>
wrote:

> why not start a new list (for example policy@jakarta.apache.org) to handle
> discussions about the whole project (ie. it's intended use) and get rid of
> this
> list entirely (or find some other use for it which is more in line with how
> it's
> actually been used)?
> 
> - robert

Nope. Read the description of the list again.

-jon

-- 
Honk if you love peace and quiet.



general@jakarta.apache.org (was Re:library directory)

Posted by Robert Burrell Donkin <Ro...@appleonline.net>.
Hans Bergsten wrote:

> Please ask this type of questions on the Tomcat Users list instead.
> The purpose of the General is described like this on our web site:
>
>   "This is the project general mailing list. This is where ideas,
>    suggestions, and comments are exchanged that deal with the
>    overall Jakarta project. Matters that affect the project as a
>    whole are decided here."
>
> This has not been followed strictly in the past, but you will see
> a lot more discussions of this nature here based on a decision in
> the PMC meeting Tuesday. It's therefore important that user questions
> are directed to the Users list instead.

IMHO...

if this list has become degraded and counterproductive then it put it out of it's
misery.

right or wrong the use of this list as a 'first port of call' is so ingrained that
you'll all have to be extremely rude for a long period if you want to reform it.
during that time, how many potential volunteers will have been scared off or
mortally offended in this time?

has anybody thought about who's going to police the list? moderated lists don't
seem very open to me.
i've often answered questions on this list which should have been asked on other
lists. i think that it is often quicker - and more productive - to provide a little
advice and push people in the appropriate direction than to get into an arguement
about what questions belong on which lists.

why not start a new list (for example policy@jakarta.apache.org) to handle
discussions about the whole project (ie. it's intended use) and get rid of this
list entirely (or find some other use for it which is more in line with how it's
actually been used)?

- robert


(i'm reminded of the parable of the canpas paths. you can't stop students walking
on the grass rather than the path. people will naturally create their own paths. a
wise university rather than placing paths where it thought people would walk, put
no paths across the grass at first. after a few months, they simply put in formal
paths following the paths created by the students. they had no further problems
with students walking on the grass - or so the parabole goes. the relevence is that
whatever the intention was when this lists was created, it now has a life of it's
own and seems - for some unknown reason - to satisfy some public need.)



Re: library directory

Posted by Hans Bergsten <ha...@gefionsoftware.com>.
"Mark R. Diggory" wrote:
> 
> Hi All,
> 
> I'm using Saxon.jar and find that when I place it in my
> webapps/myapp/WEB-INF/lib directory it fails to be loaded. If I place it in
> the tomcat/lib direcory with the servlet.jar it gets loaded. I have other jar
> files in my lib which this occurs to as well. Why is this, and is there a work
> around without having to move my jar outside of my webapps directory?
> 
> -Mark Diggory
> [...]

Please ask this type of questions on the Tomcat Users list instead.
The purpose of the General is described like this on our web site:

  "This is the project general mailing list. This is where ideas, 
   suggestions, and comments are exchanged that deal with the
   overall Jakarta project. Matters that affect the project as a 
   whole are decided here."

This has not been followed strictly in the past, but you will see
a lot more discussions of this nature here based on a decision in
the PMC meeting Tuesday. It's therefore important that user questions
are directed to the Users list instead.

Hans
-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com

library directory

Posted by "Mark R. Diggory" <md...@latte.harvard.edu>.
Hi All,

I'm using Saxon.jar and find that when I place it in my
webapps/myapp/WEB-INF/lib directory it fails to be loaded. If I place it in
the tomcat/lib direcory with the servlet.jar it gets loaded. I have other jar
files in my lib which this occurs to as well. Why is this, and is there a work
around without having to move my jar outside of my webapps directory?

-Mark Diggory

com.icl.saxon.trax.TransformException: TRaX Transform Exception
        at com.icl.saxon.Controller.transformNode(Controller.java:835)
        at vdc.net.XSLTBean.transform(XSLTBean.java:104)
        at
jsp.sm.variables._0002fjsp_0002fsm_0002fvariables_0002fsubset_0002ejspsubset_jsp_9._jspService(_0002fjsp_0002fsm_0002fvariables_0002fsubset_0002ejspsubset_jsp_9.java:124)

        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)

        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)

        at vdc.uis.Dispatch.service(Dispatch.java:109)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)

        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)

        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:484)



Re: servlets path?? HELP PLZ

Posted by Giulio Spelanzon <ba...@altoprofilo.it>.
Keith Wong wrote:

> i like to put the servlets into:
> TOMCAT_HOME\webapps\myAccounts\WEB-INF\classes\servlets\myServlet.java
 
> and JSP pages in
> TOMCAT_HOME\webapps\myAccounts\jsp\myJSP.jsp

> JSP's form tag is <form method=POST ACTION=myServlet>
 
> and i got this error
> Error: 404
> Location: /myAccounts/jsp/myServlet
> File Not Found
> /myAccounts/jsp/myServlet

Of course you get the error! It has NOTHING to do with Tomcat
configuration. If a page links (or refers to, in an action
attribute of a form tag) another page using a RELATIVE path,
like you have done, then the page is searched in the SAME
directory. Therefore if you are calling the servlet from
a jsp in the /myAccounts/jsp path, the servlet is also
expected to be there.
You have to say at least this:
action="../servlet/myServlet"
and then define a virtual path of /myAccounts/servlet to be mapped
to TOMCAT_HOME\webapps\myAccounts\WEB-INF\classes\servlets
by either Apache or Tomcat, whichever you use as a HTTP server.

Hope this helps,

Giulio