On Fri, May 30, 2003 at 05:57:25PM -0700, Jeff Knox wrote:
> Hmm, I just realized something I didn't mention -- the pages in 
> question work in the development environment (Sun ONE Studio). The 
> development environment uses it's own instance of Tomcat to parse the 
> pages. When I push the files over to the production environment it 
> fails. This leads me to believe that it's a configuration issue, but I 
> don't have a clue as to what would cause a failure at this point. 
> Examples:
> 
>    http://www.gamesquick.com/nfl2003/login.jsp
>    http://www.gamesquick.com/nfl2003/login.jsp?username=bob
> 
> Both of the above URLs work from within the IDE while the second one 
> fails in the production environment. And when it fails it says it can't 
> find the server! Where might I look to figure out what the difference 
> is?

     Hm... lacking a *lot* of information here, it's impossible to say
what's happening.  What exactly are you seeing?  

     I tried to load both URLs, the second URL doesn't load.  I tried
to troubleshoot this by telnetting to www.gamesquick.com, port 80, and
simulating an HTTP GET request to get the login page, but *that*
didn't work for either URL.

     One thought that comes to mind is, wtf are you *trying* to do
with the second URL?  

     Unless the login.jsp is coded to grab the username parameter from
the GET request and use it to pre-populate the login form, the second
URL should, at best, just produce the blank login form.  Maybe you
should post your JSP source.
 
> Both instances are running on the same physical box. The working 
> version runs in Tomcat under the IDE. The failing one runs in an 
> Apache/Tomcat setup using mod_jk to handle the JSP requests.
 
     This last detail (mod_jk) definitely points to a mapping issue.
Try installing a vanilla stand-alone tomcat, and test the second
version with that.  If the problem goes away, then you know you need
to tweak your mod_jk mappings. 

> >On Sat, 31 May 2003 08:30, Jeff Knox wrote:
> >>Has anybody ever seen JSP pages that work with forms using the POST
> >>method and not the GET method? 

     Just for the record, I have never seen this.  It's conceivably
possible, depending much on the JSP compiler, but unlikely.  If it
were going to happen, it would be like this:

     The JSP generates a servlet.  Normally when you code your own
servlet, you define one or more of the HTTP request types (GET, POST,
HEAD, etc).  A given request type has a specified method implemented
on the servlet (doPost(), doGet(), doHead(), etc).  If you then
atttempt one of the unimplemented requests with that servlet, you
would get an error.

     So, conceivably your JSP might generate a servlet that only has
one of doGet() or doPost() implemented.  However, I have no idea how
this is defined in the JSP spec, so I would not assume this is
happening.  

     Further, it was back in 1996 that I last saw this behavior, and I
suspect that today servlets might be smarter about this.  I *know* for
a fact that if you use a POST but you define the
ACTION="http://foo.com?bar=baz";, the bar=baz parameter will carry
through.  This sort of fact, though strictly speaking unrelated,
suggests that the JSP compiler might be equally smart about generating
both doPost() and doGet() methods.


     Having said all of this, your question above, and the further
example URLS you post, do not agree.  There's nothing in the examples
you posted, or the further description of the problem, that suggests
that you're actually seeing a JSP that works wtih a POST but not a
GET.  It's just suggesting that your mapping or your JSP is incorrectly
defined, so that the username parameter trips things up.
     
     Ideally, the next step in troubleshooting this would be to look
at your logs and see exactly what requests mod_jk is forwarding, and
exactly what error tomcat is reporting when you request the second
URL.  

     I would also highly recommend using telnet to www.gamesquick.com
port 80 and simulating the two requests, to see exactly what error the
server is sending back to your browser.  I tried a moment ago, but I'm
apparently too tired or too drunk to even get the first URL
successfully.

     Good luck.

-- 
Steven J. Owens
[EMAIL PROTECTED]

"I'm going to make broad, sweeping generalizations and strong,
 declarative statements, because otherwise I'll be here all night and
 this document will be four times longer and much less fun to read.
 Take it all with a grain of salt." - Me at http://darksleep.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to