RE: Implicit objects in JSP pages

2002-04-15 Thread Brook Monroe

After looking at the generated Java file, I find that the request object is
available because it's a parameter to _jspService().  I was attempting to
instantiate my objects via calls to request.getAttribute() at the point of
declaration, not in the first real code block in the page.  Once I moved the
instancing to the first code block, everything was fine.  (Some aspects of
JSP development are counter-intuitive to me, I'm afraid.)

Thanks for checking up on my query!

-Original Message-
From: rob [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 14, 2002 5:51 PM
To: Tomcat Users List
Subject: Re: Implicit objects in JSP pages


I believe that's correct how are you using the 'request' reference?

At 03:53 PM 4/12/2002 -0400, you wrote:
>According to what I've read, there should be a
>javax.servlet.http.HttpServletRequest instance by the name of "request"
>available to me in my JSP at compile time without my having to do something
>special to obtain it, yet Jasper is insisting that no such object is
>available.  Have I skipped a step somewhere?
>
>jbm!
>
>--
>To unsubscribe:   
>For additional commands: 
>Troubles with the list: 



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Implicit objects in JSP pages

2002-04-12 Thread Brook Monroe

According to what I've read, there should be a
javax.servlet.http.HttpServletRequest instance by the name of "request"
available to me in my JSP at compile time without my having to do something
special to obtain it, yet Jasper is insisting that no such object is
available.  Have I skipped a step somewhere?

jbm!

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: JSP path relative to servlet?

2002-04-11 Thread Brook Monroe

Cool...I'll check that ASAP.  (Had to focus on different project for the
afternoon...)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 11, 2002 3:36 PM
To: Tomcat Users List
Subject: Re: JSP path relative to servlet?



If "MySeatMap" is your Context root, then you do not need to include that.
String  target  = "/seatmap.jsp";
rd = getServletContext().getRequestDispatcher(target);

should suffice.

RS






Brook Monroe <[EMAIL PROTECTED]> on 04/11/2002 02:02:33 PM

Please respond to "Tomcat Users List" <[EMAIL PROTECTED]>

To:   'Tomcat Users List' <[EMAIL PROTECTED]>
cc:

Subject:  JSP path relative to servlet?

Now that I've got my servlet's XML parsing largely debugged, it's time to
see some output.

The problem is this (mucho code removed):

   String  target  = "/MySeatMap/seatmap.jsp";
   .
   .
   .
   rd = getServletContext().getRequestDispatcher(target);
   rd.forward(request,response);

I get 404'd, with the error that the JSP file can't be located.  What am I
doing wrong?  (rd is declared, I just left that out.)

jbm!


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>









--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




JSP path relative to servlet?

2002-04-11 Thread Brook Monroe

Now that I've got my servlet's XML parsing largely debugged, it's time to
see some output.

The problem is this (mucho code removed):

String  target  = "/MySeatMap/seatmap.jsp";
.
.
.
rd = getServletContext().getRequestDispatcher(target);
rd.forward(request,response);

I get 404'd, with the error that the JSP file can't be located.  What am I
doing wrong?  (rd is declared, I just left that out.)

jbm!


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




RE: Getting a servlet running under Tomcat-Apache 4.0.3

2002-04-10 Thread Brook Monroe

Jeff:

The path listed in the manager is /MySeatMap.

http://localhost:8080/MySeatMap/seating works.  Amazing. :)  Got a big list
of errors to resolve, which is what I was looking for.  Thanks!

(Off for the rest of the day...see y'all in the AM)

jbm!

-Original Message-
From: Jeff Larsen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 12:14 PM
To: Tomcat Users List
Subject: Re: Getting a servlet running under Tomcat-Apache 4.0.3


What path does the Manager display for your app? 

If tomcat is auto-deploying your app, then it should be /MySeatMap since
that is the subdir of webapps in which your WEB-INF/web.xml resides.
Then you should be accessing http://localhost:8080/MySeatMap/seating

If you are using a  element in
server.xml, 
then your URL should be http://localhost:8080/mypath/seating

Remember, the  elements only tell the container
which servlet classes to invoke WITHIN that servlet's context path.
Nothing in web.xml defines the context path itself. 

Try the above URL's and let us know if it works.

Jeff


- Original Message - 
From: "Brook Monroe" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 10, 2002 10:55 AM
Subject: RE: Getting a servlet running under Tomcat-Apache 4.0.3


> Fabian:
> >>something not directly mentioned in the howtos for deploying a servlet:
> >>you have to update the TOMCAT_HOME/conf/server.xml file for installing 
> >>your application in the "web-app"-directory. You have to add an entry
like
> >>  >> debug="0" reloadable="true"/>
> >>in server.xml if you have your servlet in a folder named
> >>TOMCAT_HOME/web-app/seating/WEB-INF/classes
> 
> That was the first thing I did, actually.  No variations on that theme
seem
> to be making any difference, and it doesn't matter whether it's under the
> Tomcat-Standalone or Tomcat-Apache section
> 
> Jeff:
> 
> >>Under what context path is your servlet deployed? The 
> >>context path is typically the name of the directory 
> >>under $TOMCAT_HOME/webapps in which your app resides.
> 
> It's deployed where the examples are, and where the manager is.
> 
> The specific path is
> 
> :\Tomcat\webapps\MySeatMap\
> 
> with the class files in :\Tomcat\webapps\MySeatMap\WEB-INF\classes
> 
> I've tried permuting this almost to exhaustion.  I've been reading the
> example setups, and I can't even figure out how the HelloWorldExample
class
> gets called.  Something to do with  tags, but I can't make out
> what's happening.
> 
> And to repeat: I know the servlet is running, because the manager and the
> logs confirm it.
> 
> For grins and giggles, here's the web.xml file.
> 
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
> 
> 
> 
> 
> MySeatMap
> 
> 
> /MySeatMap
> 
> 
> 
> 
> MySeatMap
> 
> 
> /seating
> 
> 
> 
> 
> MySeatMap
> 
> 
> /seating/
> 
> 
> 
> 
> MySeatMap
> 
> *.map
> 
> 
> 
> And the context entry:
> 
>  debug="2" crossContent="true"/>
> 
> Anyone see anything (in)obviously wrong?
> 
> jbm!
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Getting a servlet running under Tomcat-Apache 4.0.3

2002-04-10 Thread Brook Monroe

Fabian:
>>something not directly mentioned in the howtos for deploying a servlet:
>>you have to update the TOMCAT_HOME/conf/server.xml file for installing 
>>your application in the "web-app"-directory. You have to add an entry like
>>  >   debug="0" reloadable="true"/>
>>in server.xml if you have your servlet in a folder named
>>TOMCAT_HOME/web-app/seating/WEB-INF/classes

That was the first thing I did, actually.  No variations on that theme seem
to be making any difference, and it doesn't matter whether it's under the
Tomcat-Standalone or Tomcat-Apache section

Jeff:

>>Under what context path is your servlet deployed? The 
>>context path is typically the name of the directory 
>>under $TOMCAT_HOME/webapps in which your app resides.

It's deployed where the examples are, and where the manager is.

The specific path is

:\Tomcat\webapps\MySeatMap\

with the class files in :\Tomcat\webapps\MySeatMap\WEB-INF\classes

I've tried permuting this almost to exhaustion.  I've been reading the
example setups, and I can't even figure out how the HelloWorldExample class
gets called.  Something to do with  tags, but I can't make out
what's happening.

And to repeat: I know the servlet is running, because the manager and the
logs confirm it.

For grins and giggles, here's the web.xml file.


http://java.sun.com/dtd/web-app_2_3.dtd";>




MySeatMap


/MySeatMap




MySeatMap


/seating




MySeatMap


/seating/




MySeatMap

*.map



And the context entry:



Anyone see anything (in)obviously wrong?

jbm!

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Getting a servlet running under Tomcat-Apache 4.0.3

2002-04-10 Thread Brook Monroe

Greetings, y'all.
* I've read all the documentation I can find.
* I've emulated all the examples.
* I've asked people I know who have set up servlets before.

I still can't get access to the servlet I just wrote and installed.

No matter how I've set up servlet-mappings, or url-patterns, or otherwise, I
get 404'd on any attempt to test the servlet. The class files are where
they're supposed to be, and the manager HTML applet says that the servlet is
loaded and running. Supposedly (based on reading docs and looking at
examples)


MySeatingServlet
Seating


MySeatingServlet
/seating


in my web.xml file should be sufficient to get the servlet mapped to a url,
but



produces nothing but a 404, specifically

type Status report
message /seating
description The requested resource (/seating) is not available.

Obviously I'm either misinterpreting the documentation, missed something
somewhere, or making a bad assumption. I'd appreciate any input I could get
on this, because the servlet customer is breathing down my neck for the
prototype, which I would like to test before delivering it

jbm!




--
To unsubscribe:   
For additional commands: 
Troubles with the list: