Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > httpRequest resource not available

Reply
Thread Tools

httpRequest resource not available

 
 
slowlearner
Guest
Posts: n/a
 
      06-18-2008
I'm making a http requset to a file movie.txt which is located in the
same folder as Hangman.html. But I just get this error from the server


:<Sun Java System Application Server 9.1_02 - Error report
HTTP Status 404 - Status report
message description
The requested resource () is not available

Is the problem with my code or should I be putting movie.txt in a
different location?

my code is

HTTPRequest.asyncGet("movies.txt", new ResponseTextHandler() {

public void onCompletion(String responseText) {
if (responseText.indexOf("Error")>0)
{
// ***** returns the resource not found 404 error here *****
status.setText("OnCompletion:"+responseText);
return;
}
else
{
words = responseText.split("\n");

}
startGame();
}

the responseText always returns the 404 resource not found error.

I've put the file in the same folder as my hangman.html
I'm using netbeans 6.1 and gwt1.5
the movies.txt is definitely there in the war file next to the
hangman.html file.

the hangman.html file looks like this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name='gwt:module'
content='org.hangman.Main=org.hangman.Main'>
<title>Hangman</title>
<style>
body,td,a,div,.p{font-family:arial,sans-serif}
div,td{color:#000000}
a:link,.w a:link{color:#0000cc}
a:visited{color:#551a8b}
a:active{color:#ff0000}
</style>

</head>
<body>
<script language="javascript" src="org.hangman.Main/
org.hangman.Main.nocache.js"></script>
<iframe src="javascript:''" id="__gwr_historyFrame"
style="width:0;height:0;border:0"></iframe>
<h1>Hangman</h1>
<div id="hangman"></div>
</body>
</html>

All help appreciated

 
Reply With Quote
 
 
 
 
Roger Lindsjö
Guest
Posts: n/a
 
      06-18-2008
slowlearner wrote:
> I'm making a http requset to a file movie.txt which is located in the
> same folder as Hangman.html. But I just get this error from the server
>
>
> :<Sun Java System Application Server 9.1_02 - Error report
> HTTP Status 404 - Status report
> message description
> The requested resource () is not available
>
> Is the problem with my code or should I be putting movie.txt in a
> different location?
>
> my code is
>
> HTTPRequest.asyncGet("movies.txt", new ResponseTextHandler() {


JavaScript is not at all the same as Java.

However, you talk both about move.txt and moves.txt, which is it?

--
Roger Lindsjö
 
Reply With Quote
 
 
 
 
slowlearner
Guest
Posts: n/a
 
      06-18-2008
On 18 Jun, 21:51, Roger Lindsjö <news.nos...@tilialacus.net> wrote:
> slowlearner wrote:
> > I'm making a http requset to a file movie.txt which is located in the
> > same folder as Hangman.html. But I just get this error from the server

>
> > :<Sun Java System Application Server 9.1_02 - Error report
> > HTTP Status 404 - Status report
> > message description
> > The requested resource () is not available

>
> > Is the problem with my code or should I be putting movie.txt in a
> > different location?

>
> > my code is

>
> > * * * * HTTPRequest.asyncGet("movies.txt", new ResponseTextHandler() {

>
> JavaScript is not at all the same as Java.
>
> However, you talk both about move.txt and moves.txt, which is it?
>
> --
> Roger Lindsjö- Hide quoted text -
>
> - Show quoted text -


It's movies.txt . Both in the Java and the actual file on the server
match. It's just not seeing it for some reason. My guess is it's
looking somewhere else for it but I cant figure out where. I've tried
placing movies.txt in every folder on the site but it still doesn't
find it.

Thanks for the suggestion though. I have a wireless keyboard and pad
which does sometimes miss keystrokes. So for a moment I thought you
might have solved the mystery. Thanks for trying

m.cranna

 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      06-19-2008
Roger Lindsjö wrote:
> slowlearner wrote:
>> I'm making a http requset to a file movie.txt which is located in the
>> same folder as Hangman.html. But I just get this error from the server
>>
>> :<Sun Java System Application Server 9.1_02 - Error report
>> HTTP Status 404 - Status report
>> message description
>> The requested resource () is not available
>>
>> Is the problem with my code or should I be putting movie.txt in a
>> different location?
>>
>> my code is
>>
>> HTTPRequest.asyncGet("movies.txt", new ResponseTextHandler() {

>
> JavaScript is not at all the same as Java.


True.

But since the code above is Java, then what is the point ?

Arne
 
Reply With Quote
 
Owen Jacobson
Guest
Posts: n/a
 
      06-19-2008
On Jun 18, 8:16Â*pm, Arne Vajhøj <a...@vajhoej.dk> wrote:
> Roger Lindsj� wrote:
> > slowlearner wrote:
> >> I'm making a http requset to a file movie.txt which is located in the
> >> same folder as Hangman.html. But I just get this error from the server

>
> >> :<Sun Java System Application Server 9.1_02 - Error report
> >> HTTP Status 404 - Status report
> >> message description
> >> The requested resource () is not available

>
> >> Is the problem with my code or should I be putting movie.txt in a
> >> different location?

>
> >> my code is

>
> >> Â* Â* Â* Â* HTTPRequest.asyncGet("movies.txt", new ResponseTextHandler() {

>
> > JavaScript is not at all the same as Java.

>
> True.
>
> But since the code above is Java, then what is the point ?
>
> Arne


Hooray for Google Web Toolkit!

Guy: You got your Java in my Javascript!

Girl: You got your Javascript in my Java!

Both: Wow! This tastes like *ass*!

-fin-
 
Reply With Quote
 
slowlearner
Guest
Posts: n/a
 
      06-19-2008
On 19 Jun, 01:17, Owen Jacobson <angrybald...@gmail.com> wrote:
> On Jun 18, 8:16Â*pm, Arne Vajhøj <a...@vajhoej.dk> wrote:
>
>
>
>
>
> > Roger Lindsj� wrote:
> > > slowlearner wrote:
> > >> I'm making a http requset to a file movie.txt which is located in the
> > >> same folder as Hangman.html. But I just get this error from the server

>
> > >> :<Sun Java System Application Server 9.1_02 - Error report
> > >> HTTP Status 404 - Status report
> > >> message description
> > >> The requested resource () is not available

>
> > >> Is the problem with my code or should I be putting movie.txt in a
> > >> different location?

>
> > >> my code is

>
> > >> Â* Â* Â* Â* HTTPRequest.asyncGet("movies.txt", new ResponseTextHandler() {

>
> > > JavaScript is not at all the same as Java.

>
> > True.

>
> > But since the code above is Java, then what is the point ?

>
> > Arne

>
> Hooray for Google Web Toolkit!
>
> Guy: You got your Java in my Javascript!
>
> Girl: You got your Javascript in my Java!
>
> Both: Wow! Â*This tastes like *ass*!
>
> -fin-- Hide quoted text -
>
> - Show quoted text -


I'm surprised to see none of you can answer this simple question.
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      06-19-2008
On Jun 19, 7:38*pm, Lew <con...@lewscanon.com.invalid> wrote:
> slowlearner wrote:
> > I'm surprised to see none of you can answer this simple question.

>
> If it's so simple, why are you asking?


"What is the meaning of life?" is another simple
question. It's the answer, that is hard.

It always astounds me when someone who does not
know the answer to a question has the temerity to
presume the answer is simple.

What are they basing that presumption on?

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
RedGrittyBrick
Guest
Posts: n/a
 
      06-19-2008
slowlearner wrote:

> I'm surprised to see none of you can answer this simple question.


The point is, your question is about the use of the Google Web Toolkit
(GWT). I expect you would be better off asking in some GWT support forum.

I suspect your webserver logs will tell you the path of the object being
requested and from knowledge of this plus the docroot setting in the
webserver config you should be able to work out what pathname
corresponds to the current location of the object, or, where to move the
object so that it is in the place referred to in the webserver error log.

Clear as mud?

--
RGB
 
Reply With Quote
 
RedGrittyBrick
Guest
Posts: n/a
 
      06-19-2008
slowlearner wrote:
> I'm making a http requset to a file movie.txt which is located in the
> same folder as Hangman.html. But I just get this error from the server
>
> [...]
>
> my code is
>
> HTTPRequest.asyncGet("movies.txt", new ResponseTextHandler() {
>


Here's a quote:

"New users frequently notice the com.google.gwt.user.client.HTTPRequest
class, and attempt to use it. However, that particular class is intended
primarily for use by GWT's internal RPC implementation, and is not a
very friendly interface for developers to use on their own. In fact,
the HTTPRequest class may go away in a future release of GWT."

http://code.google.com/support/bin/a...94&topic=10210


I think you need help from a GWT support forum.

--
RGB
 
Reply With Quote
 
slowlearner
Guest
Posts: n/a
 
      06-19-2008
On 19 Jun, 11:43, RedGrittyBrick <RedGrittyBr...@SpamWeary.foo> wrote:
> slowlearner wrote:
> > I'm making a http requset to a file movie.txt which is located in the
> > same folder as Hangman.html. But I just get this error from the server

>
> > [...]

>
> > my code is

>
> > * * * * HTTPRequest.asyncGet("movies.txt", new ResponseTextHandler() {

>
> Here's a quote:
>
> "New users frequently notice the com.google.gwt.user.client.HTTPRequest
> class, and attempt to use it. However, that particular class is intended
> primarily for use by GWT's internal RPC implementation, and is not a
> very friendly interface for developers to use on their own. *In fact,
> the HTTPRequest class may go away in a future release of GWT."
>
> http://code.google.com/support/bin/a...94&topic=10210
>
> I think you need help from a GWT support forum.
>
> --
> RGB


Thanks for your help everybody.

I didn't mean you were all simple I was just in a hurry this morning
& worded it badly. I just thought since it's my first attempt at gwt
or web design then it stood to reason my question was simple, to
assume it was advanced would have been big headed.
If theres one thing that does not describe me that would it. Look at
my Google name(slowlearner), I always assume my problems are simple
compared to everybody else's. I did not mean you were simple. Sorry
for the miss-understanding.

m.cranna
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resource expression to access resource located in library Heinrich Moser ASP .Net 1 03-27-2008 04:25 PM
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
Resource manager problem: naming for embedded resource. Dirc Khan-Evans ASP .Net 1 10-17-2005 12:52 PM
The system cannot locate the resource specified. Error processing resource avishosh XML 2 08-08-2004 06:28 AM
Method not found: System.Collections.Specialized.NameValueCollection System.Web.HttpRequest.get_QueryString(). Mark Miller ASP .Net 1 07-18-2003 08:48 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57