Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
|
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 13th, 2005, 11:55 PM
Authorized User
 
Join Date: Feb 2005
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to IronStar
Default Problem with Tomcat/Struts

Hi all,

I am new to Tomcat and have written a simple Struts application that presents the user with a login page (from a JSP), takes their userid and password and validates it against a MySQL database. The action of the login form created by the JSP is a Struts ActionServlet (logon.do), which validates the user information, and logs debug messages to the console window and a log file. If the login is successful, the servlet forwards to another JSP with a success message. The logon form displays without a problem, but when I enter the username/password and submit the form, a blank page appears in the browser and no messages appear in the console and the log file. The source of the returned page is:

<html><body></body></html>

This output does not come from any of my servlets, so I'm guessing that the default servlet is generating this output. I am not sure if this is a Struts or Tomcat issue. Does anyone have any ideas as to what can be wrong?

If I enter the URL of the form action in the browser, the servlet processes the request and forwards me to an error page (because there was no username/password supplied). Even though the servlet works as expected, I do not see any output in my log or the console window. Where does standard output go?

I'm running Tomcat 5.0.28 on WinXP in standalone mode, and I'm using Struts 1.2. Thanks in advance for any help you can give.
 
Old February 16th, 2005, 01:23 AM
Authorized User
 
Join Date: Feb 2005
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to IronStar
Default

Hi,

I solved the problem. I cloned and modified some Struts 1.0 code that I wrote for another project and tried to run it under Struts 1.2. It appears that the Action class' perform() method has been replaced with the execute() method. Things worked well after I made this change.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat 6.0 + struts 1.1 => are they compatible? ojasrege Struts 1 November 8th, 2007 01:51 AM
how to use struts with apache tomcat vivekkumar_23 Struts 2 February 16th, 2007 05:22 PM
Tomcat / Struts Deborah Apache Tomcat 1 January 19th, 2006 08:04 PM
Use Tomcat 5.x with Struts inderjeet_79 BOOK: Professional Jakarta Struts 0 September 21st, 2005 12:24 AM
Problem in Tomcat 5.5.4 / SSL / Struts 1.1 karthickgrp Apache Tomcat 1 May 9th, 2005 10:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.