Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Common error found in java servlets

Posted on 1999-07-18
8
Medium Priority
?
354 Views
Last Modified: 2013-11-24
Hi ,
I am using simple DOS  editor & classpath i have given it as c:\javawebserver1.1.3\lib\jws.jar
& path as c:\javawebserver1.1.3\bin.
I had registered my servlet also in servlet.properties as
servlet.lin.code=link

But today morning when i did run that link servlet i got the output without making any changes.
And i wrote new servlet fooservlet.java from where i am calling method defined in barservlet.java.
In barservlet.java im implementing the interface BarInterface.This BarInterface has been defined
as public & stored as BarInterface.java in a separate file where i have defined bar() method which is
defined in barservlet.java.Every thing is compiled normally.But when I did run the servlet again
following error is occured.

Not Found (404)

The file that you requested could not be found on this server. If you provided the URL, please check
to ensure that it is correct. If you followed a hypermedia link, please notify the administrator of that
server of this error.

I did shut down the system & restarted again.Then again i did run fooservlet .
Now it is giving following error
Document contains no data Try again later or contact the server administrator later .

I dont know what the hell is going on.I wonder Once it gives 404 Not Found & some other time
it gives document contains no data some other time i am getting the output without making
any changes!!!.

I am unable  to figure out what is the root of the problem.Coz everything is fine,classpath,path,in
servlet.properties file i have registered both fooservlet.java & barservlet.java as follows
servlet.foo.code=fooservlet
servlet.bar.code=barservlet

Please help me in this regard
0
Comment
Question by:pointi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 16

Expert Comment

by:heyhey_
ID: 1246389
what is your 'servlet runner' enviroment ?
probably you haven't 'register' this servlet...
or not in classpath ...
or does not extend any servlet class ...

check your 'servlet runner' logs if you can.
0
 
LVL 7

Expert Comment

by:conick
ID: 1246390
To elaborate on what heyhey said:
Different servers have different ways of "registering" servlets.
For servletrunner you need to register it with a file called servlet.properties
You would put something like this in it:
servlet.Link.code=Link
servlet.Link.initargs=\
                           file=/tmp/filename.txt

0
 

Author Comment

by:pointi
ID: 1246391
Edited text of question.
0
How To Install Bash on Windows 10

Windows’ budding partnership with Canonical has certainly led to some great improvements. One of them being the ability to use Bash on your Windows machine without third party applications! This might be one of the greatest things a cloud engineer in a Windows environment can do!

 

Author Comment

by:pointi
ID: 1246392
Edited text of question.
0
 

Author Comment

by:pointi
ID: 1246393
I am using javawebserver1.1.3 & i also registered servlet in servlet.properties as u said.Even then it was giving  404 Not FOund Error.Now it is working fine ,but facing the same kind of problem in new servlet!!!!!!
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 1246394
browser caching ?
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 1246395
or better - restart the server ?
0
 

Accepted Solution

by:
Veena85 earned 160 total points
ID: 1246396
well restarting the server didn't work out
0

Featured Post

Quick Cloud Training

Looking for some quick training on the cloud in 2 hours or less? Check out these how-to guides in AWS, Linux, OpenStack, Azure, and more!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn different types of Android Layout and some basics of an Android App.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question