tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Turner <tomcat-u...@johnturner.com>
Subject Re: Can't see new jsp pages
Date Thu, 15 May 2003 19:02:04 GMT

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html

Tomcat has a default context of "" or "/" (http://host/).  If you want 
anything else, like /myApp (http://host/myApp) where "myApp" is a web 
application in Tomcat terminology, you need a Context.

John

On Thu, 15 May 2003 14:58:19 -0400, Schwartz, David (CHR) 
<David.Schwartz3@pfizer.com> wrote:

>>> making sure you have a Context defined in some manner.
>
> can you please describe what you mean by "context" & how to create one.
>
>
> -----Original Message-----
> From: John Turner [mailto:tomcat-user@johnturner.com]
> Sent: Thursday, May 15, 2003 2:23 PM
> To: Tomcat Users List
> Subject: Re: Can't see new jsp pages
>
>
>
> There's nothing you need to do to have Tomcat discover new JSPs, other 
> than making sure you have a Context defined in some manner.
>
> However, that said, I am thinking that there is something goofy going on 
> with the examples webapp.  Here is what I just did:
>
> - fresh install of 4.1.24 on Windows
> - created JSP shown here:
>
> <html>
> <head>
> <title>TEST</title>
> </head>
> <body>
> <%
> out.println("***Success***");
> %>
> </body>
> </html>
>
> - put it in /examples (http://localhost:8080/examples/test.jsp) RESULT = 
> Tomcat 404
>
> - put it in /examples/dates 
> (http://localhost:8080/examples/dates/test.jsp) RESULT = Tomcat 404
>
> - put it in / (http://localhost:8080/test.jsp, aka 
> CATALINA_HOME/webapps/ROOT) RESULT = success
>
> So, I forgot where you were with putting your JSP in various directories, 
> but it seems to me that there is indeed something going on with the 
> /examples webapp.  Not sure what, exactly, but my tests seem to duplicate 
> yours to an extent.
>
> HTH
>
> John
>
> On Thu, 15 May 2003 14:03:26 -0400, Galuza, Mike <MGaluza@dejarnette.com> 
> wrote:
>
>> Okay, forget that last message.  It looks like the differences have to 
>> do
>> with the fact that the sample jsp pages had already been compiled (or 
>> maybe
>> cached?).  If I access another sample jsp page that I had never accessed
>> before the log looks identical to the one that fails.
>>
>> So I'm back to square one, and I'm getting desperate.  Does anyone have 
>> any
>> suggestions on what to do to try to figure this out?
>>
>> Maybe I should ask some more basic questions.  Should I need to do 
>> anything
>> to make tomcat "discover" new jsp files I create?  Is there a way to log
>> what files tomcat has discovered?  Any other ideas?
>>
>> Please, I'm starting to lose faith and I'm very close to giving up and 
>> going
>> back to the old versions I had working fine.
>>
>> Thanks,
>> Mike
>>
>> -----Original Message-----
>> From: Galuza, Mike [mailto:MGaluza@dejarnette.com]
>> Sent: Thursday, May 15, 2003 13:18
>> To: 'Tomcat Users List'
>> Subject: RE: Can't see new jsp pages
>>
>>
>> Okay, I've been poking around a while, trying to solve this problem and 
>> I've
>> been able to get one more clue that may help the gurus out there figure 
>> out
>> my problem.  I uncommented the RequestDumperValve and then tried again.  
>> The
>> logs revealed some differences between the case where tomcat finds the 
>> file
>> and the case when it does not find the file.
>>
>> Here are the results in the log file when it does find the file:
>>
>> 2003-05-15 12:58:43 RequestDumperValve[Standalone]:
>> ===============================================================
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]: REQUEST URI
>> =/examples/jsp/snp/snoop.jsp
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:           
>> authType=null
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:  
>> characterEncoding=null
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:      contentLength=0
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:        
>> contentType=null
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:        contextPath=
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:
>> header=content-length=0
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:
>> header=accept-encoding=gzip, deflate
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:
>> header=connection=Keep-Alive
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:
>> header=host=myhostname
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:
>> header=accept-language=en-us
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:
>> header=user-agent=Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:
>> header=accept=application/msword, application/vnd.ms-excel, image/gif,
>> image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint,
>> application/x-shockwave-flash, */*
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:             
>> locale=en_US
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:             
>> method=GET
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:           
>> pathInfo=null
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:
>> protocol=HTTP/1.1
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:        
>> queryString=null
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:
>> remoteAddr=xxx.xxx.xxx.xxx
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:         
>> remoteHost=null
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:         
>> remoteUser=null
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]: 
>> requestedSessionId=null
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:             
>> scheme=http
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:
>> serverName=myhostname
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:         
>> serverPort=80
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:        
>> servletPath=null
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:           
>> isSecure=false
>> 2003-05-15 12:59:21 RequestDumperValve[Standalone]:
>> ---------------------------------------------------------------
>> 2003-05-15 12:59:31 RequestDumperValve[Standalone]:
>> ---------------------------------------------------------------
>> 2003-05-15 12:59:31 RequestDumperValve[Standalone]:           
>> authType=null
>> 2003-05-15 12:59:31 RequestDumperValve[Standalone]:      contentLength=- 
>> 1
>> 2003-05-15 12:59:31 RequestDumperValve[Standalone]:
>> contentType=text/html;charset=ISO-8859-1
>> 2003-05-15 12:59:31 RequestDumperValve[Standalone]:            
>> message=OK
>> 2003-05-15 12:59:31 RequestDumperValve[Standalone]:         
>> remoteUser=null
>> 2003-05-15 12:59:31 RequestDumperValve[Standalone]:             
>> status=200
>> 2003-05-15 12:59:31 RequestDumperValve[Standalone]:
>> ===============================================================
>>
>> and here are the results when it does not find the file
>>
>> 2003-05-15 12:59:31 RequestDumperValve[Standalone]:
>> ===============================================================
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]: REQUEST URI
>> =/examples/jsp/test/date.jsp
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:           
>> authType=null
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:  
>> characterEncoding=null
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:      contentLength=0
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:        
>> contentType=null
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:        contextPath=
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> cookie=JSESSIONID=4D580D7F9A8120DAEBA86F97BEF2938A
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> header=content-length=0
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> header=accept-encoding=gzip, deflate
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> header=connection=Keep-Alive
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> header=host=myhostname
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> header=accept-language=en-us
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> header=user-agent=Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> header=cookie=JSESSIONID=4D580D7F9A8120DAEBA86F97BEF2938A
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> header=accept=application/msword, application/vnd.ms-excel, image/gif,
>> image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint,
>> application/x-shockwave-flash, */*
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:             
>> locale=en_US
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:             
>> method=GET
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:           
>> pathInfo=null
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> protocol=HTTP/1.1
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:        
>> queryString=null
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> remoteAddr=xxx.xxx.xxx.xxx
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:         
>> remoteHost=null
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:         
>> remoteUser=null
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> requestedSessionId=4D580D7F9A8120DAEBA86F97BEF2938A
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:             
>> scheme=http
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> serverName=myhostname
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:         
>> serverPort=80
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:        
>> servletPath=null
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:           
>> isSecure=false
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> ---------------------------------------------------------------
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> ---------------------------------------------------------------
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:           
>> authType=null
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:      contentLength=- 
>> 1
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> contentType=text/html;charset=ISO-8859-1
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> header=Content-Language=en-US
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> message=/jsp/test/date.jsp
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:         
>> remoteUser=null
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:             
>> status=404
>> 2003-05-15 13:00:32 RequestDumperValve[Standalone]:
>> ===============================================================
>>
>> The big difference I see is:
>> contextPath=
>> cookie=JSESSIONID=4D580D7F9A8120DAEBA86F97BEF2938A
>> and
>> header=cookie=JSESSIONID=4D580D7F9A8120DAEBA86F97BEF2938A
>> and finally
>> requestedSessionId=4D580D7F9A8120DAEBA86F97BEF2938A
>>
>> Could this cookie/sessionID have anything to do with my problem?  Does 
>> this
>> give anyone any clues?
>>
>> Thanks,
>> Mike
>>
>>>> > ----- Original Message -----
>>>> > From: "John Turner" <tomcat-user@johnturner.com>
>>>> > To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
>>>> > Sent: Thursday, May 15, 2003 6:38 PM
>>>> > Subject: Re: Can't see new jsp pages
>>>> >
>>>> >
>>>> >>
>>>> >> Not really, unfortunately.  I've never seen this behavior.  Does

>>>> the
>>>> >> work
>>>> >> directory exist in CATALINA_HOME?
>>>> >>
>>>> >> John
>>>> >>
>>>> >> On Thu, 15 May 2003 09:01:11 -0400, Galuza, Mike
>>>> >> <MGaluza@dejarnette.com>
>>>> >> wrote:
>>>> >>
>>>> >> > I get a tomcat 404 error.  It looks something like this:
>>>> >> >
>>>> >> > ----------------
>>>> >> > HTTP Status 404 - file name
>>>> >> >
>>>> >> > type: Status report
>>>> >> > message: filename
>>>> >> > description: The requested resource (filename) is not available.
>>>> >> >
>>>> >> > Apache Tomcat/4.1.24
>>>> >> > ----------------
>>>> >> >
>>>> >> > suggestions?
>>>> >> >
>>>> >> >
>>>> >> > -----Original Message-----
>>>> >> > From: John Turner [mailto:tomcat-user@johnturner.com]
>>>> >> > Sent: Thursday, May 15, 2003 08:55
>>>> >> > To: Tomcat Users List
>>>> >> > Subject: Re: Can't see new jsp pages
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> > What's the error message you get?  404?  Apache or Tomcat errors
>>>> >> (Tomcat
>>>> >> > error pages look different).
>>>> >> >
>>>> >> > John
>>>> >> >
>>>> >> > On Thu, 15 May 2003 08:47:57 -0400, Galuza, Mike
>>>> > <MGaluza@dejarnette.com>
>>>> >> > wrote:
>>>> >> >
>>>> >> >> I'm running Apache 2.0.44 and Tomcat 4.1.24 and mod_jk
on Win2k.
>>>> >> >>
>>>> >> >> I can see http://localhost/examples/jsp/dates/date.jsp,
which is 
>>>> one
>>>> >> of
>>>> >> >> the
>>>> >> >> example jsp pages that comes with tomcat.  But if I create
a new
>>>> >> >> directory
>>>> >> >> and jsp file, say examples/jsp/test/xxx.jsp, tomcat can't
seem 
>>>> to
>>>> >> find
>>>> >> >> the
>>>> >> >> file.  If I move date.jsp to examples/jsp/test it can't
see it.  
>>>> If
>>> I
>>>> >> >> move
>>>> >> >> my xxx.jsp to examples/jsp/dates it can't see it.
>>>> >> >>
>>>> >> >> Sorry for my ignorance, but what's the deal?  Tomcat can't
seem 
>>>> to
>>>> >> see
>>>> >> >> any
>>>> >> >> new jsp files I create or move.  How do I get it to find
these
>>> files?
>>>> >> >>
>>>> >> >> Thanks in advance
>>>> >> >>
>>>> >>
>>>>> ---------------------------------------------------------------------
>>>> >> >> To unsubscribe, e-mail: tomcat-user- 
>>>> unsubscribe@jakarta.apache.org
>>>> >> >> For additional commands, e-mail: tomcat-user- 
>>>> help@jakarta.apache.org
>>>> >> >>
>>>> >> >>
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >>
>>>> >>
>>>> >>
>>>> >> --
>>>> >> Using M2, Opera's revolutionary e-mail client: 
>>>> http://www.opera.com/m2/
>>>> >>
>>>> >> --------------------------------------------------------------------

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

>>>>
>>>>
>>>> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>> >
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Using M2, Opera's revolutionary e-mail client: 
>>>> http://www.opera.com/m2/
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>
>>
>>
>
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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


Mime
View raw message