This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Problem with a couple of servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem with a couple of servlets" Watch "Problem with a couple of servlets" New topic
Author

Problem with a couple of servlets

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 412
Hello I had made a couple of servlets today, one called doUploadVideo.java and the other one named doUpdateFuneralHomeInfo.java

What I did was I appended the old servlet, doUpdateFuneralHomeInfo.java with a reference to doUploadVideo.java

no errors inside the IDE (Eclipse Galileo)

When I compiled and distributed on test, I got this stack trace. I wanted to preserve the old code in case I needed to get it back (not using subversion or CVS right now) so I put the extension _old on one of the files. I am not sure if this caused a problem or not, can you help me?

I am reviewing this stack trace from the log:

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

Michele Smith wrote:

Your doUpdateFuneralHomeInfo class cannot be compiled because it must be located in file doUpdateFuneralHomeInfo.java. I guess that "_old" is causing these issues. Just move the old source files to a different folder outside the current web application. Or better yet, use a versioning system like Subversion or CVS.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 412
do you really think that the _old file is causing problems?

I will try in the morning, but I just wanted to double-check.

Thank you for your kind help,

Michele
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

It could be. The error messages says that class doUpdateFuneralHomeInfo is in an incorrectly named file. If that file is doUpdateFuneralHomeInfo_old.java that makes sense.
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 412
Thanks a lot,

Michele
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

You're welcome.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Problem with a couple of servlets
 
Similar Threads
Running application on web start
I am connecting liferay communtiy edition 6.0.6 with postgresql 9.1 and using apache tomcat server6.
Error The requested resource is not available
Hibernated Pojo Generator using config.xml for Oracle database
getting error -HttpURLConnection