Board index » jbuilder » html for applet gets deleted

html for applet gets deleted


2003-10-22 05:48:48 PM
jbuilder5
Hi,
I use JBuilder 7 SE.
I create a new applet using jbuilder. For this I choose in the menu
File>New>Web>Applet. In the applet creation wizard, I choose to generate the
html.
The html gets generated in the output directory of my project. However, when
i try to rebuild the project, by clicking in the menu Project>Rebuild
Project, the html gets deleted. I have not found any way to generate it
again.
Rgds
Sachin
 
 

Re:html for applet gets deleted

In < XXXX@XXXXX.COM >Sachin Vaidya wrote:
Quote
I use JBuilder 7 SE.
I create a new applet using jbuilder. For this I choose in the menu
File>New>Web>Applet. In the applet creation wizard, I choose to
generate the html. The html gets generated in the output directory of
my project. However, when i try to rebuild the project, by clicking
in the menu Project>Rebuild Project, the html gets deleted. I have
not found any way to generate it again.
Hmmm, I could duplicate this behavior only once; I'm
not sure but it seemed to be related to trying to run
the applet via the .html file by right-clicking on the
"Web Run using defaults" context menu (Project Pane).
Initially, I thought it might be that what you were
seeing happened when compiling the source code, due to
having the "Synchronize output dir" option set. But
this seemed to have no effect in my attempt to reproduce
the behavior.
Do you have a reliable way to duplicate this behavior?
To restore the .html file, you might look in the
/bak/classes folder -- maybe you edited it and a
backup was made. Most likely, you didn't and no
backup exists.
You have either of two options going forward to
prevent this from happening:
1. Immediately upon finishing the Applet Wizard,
rename the Applet1.html file (right-click on its
node in the Project Pane, "Rename "Applet1.html...".
Renaming allows you to move the file from one
directory to another. If you have not already defined
a Web app directory under your project root directory,
do so prior to renaming (moving) this .hmtl file.
Once you have a Web app directory under your project
directory, move the .html file there. Alternatively,
you could move the file to the root of the /src
directory.
2. Open the Project Properties dialog. Click
the "Build" tab, and uncheck the "Synchronize
output dir" option. Mind you, this is probably
a sub-optimal approach because one ordinarily
wants to clean the output directory (e.g., "classes")
to eliminate the possibility of referencing a
stale class or resource.
Since I cannot reliably duplicate the behavior
you are seeing, I'm only guessing that this second
approach will fix the problem. So, were I facing
this problem, I'd use approach #1. However, I
realize that #1 requires remembering to take
preventative steps prior to running -- steps which
are very easy to forget.
The best thing you could do is to isolate a
very reproducible case, one which specifies
your project properties and whatnot. Then come
back here if you cannot find a work-around, and
maybe someone can figure out why this happens.
Paul Furbacher [TeamB]
Save time, search the archives:
info.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
 

Re:html for applet gets deleted

I have attached the project (with source, classes, html and project file) in
"borland.public.attachments" with title "applet html gets deleted project".
You will find Applet1.html inside classes/untitled2. Once you rebuild the
project, this html will get deleted.
This problem always occurs when I use the default settings. I tried renaming
and moving the file to a different location, and it works, however, its not
a good solution for me.
In fact, even if I have any html (which is not even a part of the project)
in classes/untitled2, say, faltu.html, it gets deleted.
Rgds,
Sachin
"Paul Furbacher [TeamB]" < XXXX@XXXXX.COM >wrote in message
Quote
In < XXXX@XXXXX.COM >Sachin Vaidya wrote:

>I use JBuilder 7 SE.
>I create a new applet using jbuilder. For this I choose in the menu
>File>New>Web>Applet. In the applet creation wizard, I choose to
>generate the html. The html gets generated in the output directory of
>my project. However, when i try to rebuild the project, by clicking
>in the menu Project>Rebuild Project, the html gets deleted. I have
>not found any way to generate it again.

Hmmm, I could duplicate this behavior only once; I'm
not sure but it seemed to be related to trying to run
the applet via the .html file by right-clicking on the
"Web Run using defaults" context menu (Project Pane).

Initially, I thought it might be that what you were
seeing happened when compiling the source code, due to
having the "Synchronize output dir" option set. But
this seemed to have no effect in my attempt to reproduce
the behavior.

Do you have a reliable way to duplicate this behavior?


To restore the .html file, you might look in the
/bak/classes folder -- maybe you edited it and a
backup was made. Most likely, you didn't and no
backup exists.

You have either of two options going forward to
prevent this from happening:

1. Immediately upon finishing the Applet Wizard,
rename the Applet1.html file (right-click on its
node in the Project Pane, "Rename "Applet1.html...".
Renaming allows you to move the file from one
directory to another. If you have not already defined
a Web app directory under your project root directory,
do so prior to renaming (moving) this .hmtl file.
Once you have a Web app directory under your project
directory, move the .html file there. Alternatively,
you could move the file to the root of the /src
directory.

2. Open the Project Properties dialog. Click
the "Build" tab, and uncheck the "Synchronize
output dir" option. Mind you, this is probably
a sub-optimal approach because one ordinarily
wants to clean the output directory (e.g., "classes")
to eliminate the possibility of referencing a
stale class or resource.

Since I cannot reliably duplicate the behavior
you are seeing, I'm only guessing that this second
approach will fix the problem. So, were I facing
this problem, I'd use approach #1. However, I
realize that #1 requires remembering to take
preventative steps prior to running -- steps which
are very easy to forget.


The best thing you could do is to isolate a
very reproducible case, one which specifies
your project properties and whatnot. Then come
back here if you cannot find a work-around, and
maybe someone can figure out why this happens.


Paul Furbacher [TeamB]

Save time, search the archives:
info.borland.com/newsgroups/ngsearch.html

Is it in Joi Ellis's Faq-O-Matic?
www.visi.com/~gyles19/fom-serve/cache/1.html

Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.
 

{smallsort}

Re:html for applet gets deleted

Hi Paul,
Could you reproduce the problem?
Rgds
Sachin
"Sachin Vaidya" < XXXX@XXXXX.COM >wrote in message
Quote
I have attached the project (with source, classes, html and project file)
in
"borland.public.attachments" with title "applet html gets deleted
project".
You will find Applet1.html inside classes/untitled2. Once you rebuild the
project, this html will get deleted.
This problem always occurs when I use the default settings. I tried
renaming
and moving the file to a different location, and it works, however, its
not
a good solution for me.
In fact, even if I have any html (which is not even a part of the project)
in classes/untitled2, say, faltu.html, it gets deleted.
Rgds,
Sachin

"Paul Furbacher [TeamB]" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>In < XXXX@XXXXX.COM >Sachin Vaidya wrote:
>
>>I use JBuilder 7 SE.
>>I create a new applet using jbuilder. For this I choose in the menu
>>File>New>Web>Applet. In the applet creation wizard, I choose to
>>generate the html. The html gets generated in the output directory of
>>my project. However, when i try to rebuild the project, by clicking
>>in the menu Project>Rebuild Project, the html gets deleted. I have
>>not found any way to generate it again.
>
>Hmmm, I could duplicate this behavior only once; I'm
>not sure but it seemed to be related to trying to run
>the applet via the .html file by right-clicking on the
>"Web Run using defaults" context menu (Project Pane).
>
>Initially, I thought it might be that what you were
>seeing happened when compiling the source code, due to
>having the "Synchronize output dir" option set. But
>this seemed to have no effect in my attempt to reproduce
>the behavior.
>
>Do you have a reliable way to duplicate this behavior?
>
>
>To restore the .html file, you might look in the
>/bak/classes folder -- maybe you edited it and a
>backup was made. Most likely, you didn't and no
>backup exists.
>
>You have either of two options going forward to
>prevent this from happening:
>
>1. Immediately upon finishing the Applet Wizard,
>rename the Applet1.html file (right-click on its
>node in the Project Pane, "Rename "Applet1.html...".
>Renaming allows you to move the file from one
>directory to another. If you have not already defined
>a Web app directory under your project root directory,
>do so prior to renaming (moving) this .hmtl file.
>Once you have a Web app directory under your project
>directory, move the .html file there. Alternatively,
>you could move the file to the root of the /src
>directory.
>
>2. Open the Project Properties dialog. Click
>the "Build" tab, and uncheck the "Synchronize
>output dir" option. Mind you, this is probably
>a sub-optimal approach because one ordinarily
>wants to clean the output directory (e.g., "classes")
>to eliminate the possibility of referencing a
>stale class or resource.
>
>Since I cannot reliably duplicate the behavior
>you are seeing, I'm only guessing that this second
>approach will fix the problem. So, were I facing
>this problem, I'd use approach #1. However, I
>realize that #1 requires remembering to take
>preventative steps prior to running -- steps which
>are very easy to forget.
>
>
>The best thing you could do is to isolate a
>very reproducible case, one which specifies
>your project properties and whatnot. Then come
>back here if you cannot find a work-around, and
>maybe someone can figure out why this happens.
>
>
>Paul Furbacher [TeamB]
>
>Save time, search the archives:
>info.borland.com/newsgroups/ngsearch.html
>
>Is it in Joi Ellis's Faq-O-Matic?
>www.visi.com/~gyles19/fom-serve/cache/1.html
>
>Finally, please send responses to the newsgroup only.
>That means, do not send email directly to me.
>Thank you.


 

Re:html for applet gets deleted

In <3f9f6b9f$ XXXX@XXXXX.COM >Sachin Vaidya wrote:
Quote
Could you reproduce the problem?
Thanks for jogging my memory. I downloaded your example
from the attachments newsgroup, but something came up to
divert my attention and I just plain forgot. Sorry.
Quote
I have attached the project (with source, classes, html and project
file) in "borland.public.attachments" with title "applet html gets
deleted project". You will find Applet1.html inside classes/untitled2.
Once you rebuild the project, this html will get deleted. This
problem always occurs when I use the default settings. I tried
renaming and moving the file to a different location, and it works,
however, its not a good solution for me. In fact, even if I have any
html (which is not even a part of the project) in classes/untitled2,
say, faltu.html, it gets deleted.
Okay, what you are seeing is the result of the default value of
Project Properties>Build>Java>Synchronize output dir (i.e.,
true). In some sense, JBuilder's penchant for putting the
applet's HTML file in the output directory isn't so good
because, believe it or not, cleaning the output directory
is a good idea.
What you could do is to move that HTML file into
the equivalent folder hierarchy in the "src" folder.
Then, add that file to the project. Finally, right-click
on the HTML file's node in the Project Pane, select
"Properties ...". In the Resource tab, html should be
selected. Click on the "Copy" button to the _right_
of the list.
Now, recompile and confirm that the HTML file is
copied to the classes folder.
Paul Furbacher [TeamB]
Save time, search the archives:
info.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.