• Post Reply Bookmark Topic Watch Topic
  • New Topic

ControllerServlet 404 error

 
Gran Roguismo
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no doubt this is going to be a tough one to solve but I'm running out of ideas and perhaps someone just happens to know the answer I'm looking for.
I'm workign with an old product for my company. A pre struts project running on Java 1.3 and Tomcat 3.
Recently I've been asked to do some very small upgrades, but I'm having problems getting the development enviroment up and running.
I did a few changes to the structure to bring it into eclipse as a web project (taking JSPs out of the root directory and putting them into WebRoot). I have also started it up with tomcat 5 now. The project itself still uses java 1.3
I get no compile errors and I start the server. The initial welcome jsp pops up with what I'm looking for.
Beyond that though, it can't find the ControllerServlet. I get a 404.
Does anybody have any ideas on how I can get this little dela to work?
thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it was written for TC3 there is a good chance that it relys on the invoker servlet as opposed to having a mapping for each servlet in web.xml.

What do the hyperlinks look like?
 
Gran Roguismo
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
they do indeed use a control servlet. The links look like this
"ControllerServlet?action=showPage&page=manageNotification.jsp"
at the moment it seems that the problem lies in the fact that it's not compiling any of those classes.
I am now finding the page, but it's under the webroot directory that I've created and moved the files into. (/WBS/webroot/login.jsp rather than /WBS/login.jsp)

when I do go to the page I get an error like :
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's usually caused by either:
Not having JAVA_HOME point to a full jdk (j2sdk1.3xxx) or from not having write permissions for the directory where Tomcat puts the generated servelet code (TOMCAT_HOME/work on current versions).
 
Gran Roguismo
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll check into both of those things as I am not the sys admin and it's possible that I indeed don't have the access, or the home is not set as you said.
 
Neeraj Dheer
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or maybe the jsp jar file is not in the classpath? I had faced this problem with Tomcat 4.1.29 so maybe the same issue with TC3?

[Edit : Added the following]

Can you also post the entire exception? wit the full trace etc?
[ June 07, 2005: Message edited by: Neeraj Dheer ]
 
Gran Roguismo
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks again for your help guys. The problem remains unsolved, but I'm still hopeful.

Here is the full error:



I have checked into the JAVA_HOME
My user has an enviroment with it set as such:


and I do have access to the work directory because the server is supposedly working in a sub directory of the webapp apparently. This is what that looks like in the server.xml
 
Gran Roguismo
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was told this, but I can't make heads or tales of the advice
To fix, adjust the tomcat/webserver properties to specify the webroot appropriately and move all jsps and web stuff to the webroot subdirectory.


Where is the tomcat/webserver properties that he's talking about
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
import com.company.wbs.util.*;


The app can't find the package listed above.
Where is this package on your system?
 
Gran Roguismo
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
currently classes are located in:
/usr/local/tomcat3/webapps/WBS/webroot/WEB-INF/classes/com/company/wbs/util

and java code in:
/usr/local/tomcat3/webapps/WBS/src/com/company/wbs/util
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you configured the docBase to be:
/usr/local/tomcat3/webapps/WBS/webroot
?

By default, tomcat looks for webapps in the TOMCAT_HOME/webapps directory.
It expects to find WEB-INF in the top level directory of the webapp.
 
Gran Roguismo
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, I have that piece of code from the server.xml listed above. I also specify a work directory. Is that appropriate?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!