unable to navigate html files in eclipse using tomcat server - html

I am using a Eclipse Juno with Tomcat 7.
After creating a java dynamic web project, i added a folder home folder in WebContent directory. Inside home folder i added address.jsp and h1.html.
What i was trying to do is call/link h1.html from address.jsp. I have written following code in address.jsp to do so:
Go to h1. But I am getting 404 error each time...
However when I added 1 more folder home2 in WebContent and inside home2 i added h2.html and then I finally change my code in address.jsp as:
Go to home2/h2. Now in this case I am not getting any error and h2.html is displaying properly. I wanted to know why I am not able to access html file from same directory.
Following is the hierarchy...
-------WebContent---------->
----------home----->
---address.jsp
---h1.html
----------home2----->
---h2.html

I figured it out... Instead of using Go to h1, I had to use Go to h1. I'm surprise, why am i have to mention the current directory, (in this case its home) even when I'm already in that directory. I think it only happens when we're creating web pages in Eclipse environment using Tomcat because there is no such requirement, if we are simply creating pages in some other editor like notepad or notepad++ in same folder, without using tomcat server.

Related

Vs code live server Cannot get error message

I'm currently developing a simple static web page with only HTML.
I'm using tags with href to link to different pages and the VS code live server used to work when I inserted a link like page1.html it would send the browser to this page.
But I prefer to have just the page without the .html.
When I remove the .html from the link the live server gives an error: Cannot GET /page1
But when I deploy my site on Netlify it does, however, find the page, but this breaks the development process for me.
How can I fix the live server so it also gets sent to the correct page?
Thank you in advance,
Timo
This is a common server behaviour. The server tries to find a file or folder name page1 but doesn't find it. Nothing wrong with live server. I guess Netlify is the one doing extra magic.
However if you want to remove the .html in page1 you could create a folder name page1 and put inside a index.html with the content. This way the server will find the folder named page1 and return the index.html. This will also work with live server and any standard server.
This is how your folder structure could look like:
Cannot GET /source/gfdfghdgh/A/1&2.html
This is the error I get because of the '&' symbol.
Make sure your file name is browser friendly.
VS CODE LIVE SERVER CANNOT GET ERROR MESSAGE
Restart VSCode
Sometimes the best you can do is start VSCode from scratch. First, save all of your work. Then close VSCode, which will also stop all of the extensions you've installed. Then, reopen VSCode and try again – go to the HTML file you want to view, right-click## Heading ##, and select "Open with Live Server".

How to correctly deploy a FLEX\FLASH swf application?

I am absolutly new in Flex and Flash and I have the following problem.
I have to work on a Flex 4 project made by someone else in the past using the Eclipse plugin and building it using an ANT script (but I think that this is not so important).
After that I run my ANT script it build my project into this target folder:
So, as you can see in the previous image, the building project have created the target content corresponding to the Main.swf file (that I think is the Flex\Flash application), the asset directory (that contains some resources used by the application: fonts, incos, images and CSS) and the flexmonster directory that should contains something related to a library that generates table.
My problem is: now how can I deploy this application?
I saw this video tutorial: https://www.youtube.com/watch?v=z0YTZm1v7qQ&t=326s
but in this tutorial show that the project generates also an html that is linked to the swf file (but doesn't show the HTML content, in the tutorial seems to be autogenerated).
How can I try to execute my application? (into the browser)
Are there some difference in the deploy of a Flex and Flash application or are the same thing?
You should:
embed the swf, see: How to embed a SWF file in an HTML page?
transfer the files inside the target folder (including the embedded html for example) onto your server.
But you should ask in your company how they embed the swf, may it is delivered from the JAVA-application and not in plain HTML.
To correctly deploy a Flash or Flex web app you require to:
Create an HTML file which will embed your .swf file using SWFObject.
The SWFObject JS library.
Put those two files in your 'target' folder, then upload the 'target' folder to your web server.
Here's a quick tip for steps 1 and 2:
In Flash Builder you are going to see at the top a button with an icon that looks like a globe with an orange arrow, it is the Release Build button. Press it.
Flash Builder is going to generate a very similar folder to your 'target' folder. Copy and paste the .html and .js file into your 'target' folder.
Now you can upload your 'target' folder to your web server (via FTP or admin panel).
Just copy target folder files to your production web location.

How to manage eqFTP in Brackets to download files from server to pc

I am new to Brackets and I cannot find a solution to my problem.
I have a website and it has a CMS with lots of templates and css in different folders.
I need to modify all of them, one by one, changing styles, adding content and markups and so on.
I just started using Brackets and just installed eqFTP in it following the guide and set everything.
Now how can I download, using eqFTP, all templates and css from the server to my folder project in my pc so I can modify them and upload them all from brackets?
For example: if my templates are in public_html/templates and css are in public_html/styles/ how can I tell to eqFTP to download them in folder project?
dev here.
You should create new connection and then connect to your server, you'll see file tree and you want to right click on folder/file you need to download and choose 'Download'. For files you can actually use doubleclick which will download and open that file.
Hope this helps.

IN asp.net MVC project, accessing HTML page in subdirectory returns 404 error

I have a working project that is built in visual studio as MVC project with angular js. I want to convert it to basic html+angular website. So I created an empty website project, renamed and converted all my cshtml pages to html pages.
When I run project, home page loads, properly, all the partial pages in root directory ( views ) loads fine. The problem is with pages in subdirectories (views/home). For those pages it gives 404 error.
I have kept exact same structure as my original MVC website where all pages load properly.
Just for troubleshooting I added another page in subdirectory and set it as startup page. But I get 404 error even if I Run the project or do view in browser.if I copy that page in root directory, it works.
Does any one faced same issue? Or I need to same more things in an empty project?
There's a web.config file in /view which is partially used to prevent view files from being requested directly, since that's not desirable in MVC.
You'll need to find that file, and remove the DenyHandler entry in it to be able to serve links to those directly.

Simple HTML directory/index.html issue

I feel like a baby for having to do this but bear with me. I'm trying to set up webpage structures on my desktop in a folder. It's got an index.html and a couple folders of its own. One folder, "research", has its own index.html. I'm trying to link to this page from the higher index.html with but instead of taking me to research/index.html it takes me to a 'file-directory view' (for lack of knowing what to call it) of the directory research/
Clearly I could fix this by doing but that's annoying. Thoughts?
if you want to browse locally, you will have to include the file name. in other words:
<a href='research/index.html'>research</a>
The reason it works on remote servers is because replacement is done by the web server so if you want research/ to work then you will need a local web server such as wamp on windows or mamp on mac.