Do not see changes made in HTML file in Eclipse - html

I have created simple login.html file in Dynamic Web Project + Maven + GlassFish in Eclipse.
!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Login Page</title>
<style type="text/css">
form {text-align: center}
</style>
</head>
<body>
<form action="LoginServlet" method="post">
USERNAME:<input type="text" name="name" value=""/><br>
PASSWORD:<input type="password" name="password" value=""/><br>
<input type="submit" value="ENTER"/>
<input type="reset" value="CLEAR"/>
</form>
</body>
</html>
I launch login.html file like Run as -> Run on server and it looks ok.
But when I changed something in html and try to run it on server I did not see my changes.
Try mvn clean, mvn install.
What should I do to see changes in html file when I Run it on Server? (In Preview I see changes)

When you launch your *.html file on server it opens in Eclipse browser. To see your changes you need to click on Green triangle "Go to the selected URL" and page will be updated.

Related

Having Issue on Ubuntu Server Not able to find images folder with HTML (Issue do not happen on Windows)

I can get it to work on windows but I can not get it work on Ubuntu server. The file is in the images folder and inside that is the png file. The html is in the templates folder and inside the template folder is the images folder with the png file. I have the same setup on windows and it works.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Search</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class= "container">
<form action="/search" class="search-bar" method="GET">
<label for="query">Search:</label><br>
<input type="text" name="query" placeholder="Enter Serial Number"><br>
<button type="submit"><img src="images/search.png"></button>
</form>
</div>
</body>
</html>
I try move the files and even copy the whole dir the issue persist. It suppose to show an image but it don't. Even my style.css not being found.

Browser Extension - How do I stop autofocus from going to the address bar?

I have a browser extension which replaces the new tab page with a page that has a nice background and a search bar. Using the search bar takes the user to google and searches for the query (in the same tab). For some reason, when using the extension version, the autofocus doesn't go into my search form and instead goes into the address bar. I can't for the life of me figure out why. Did I muck this up someplace? This is my search form:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Search</title>
<link rel="stylesheet" type="text/css" href="popup.css" />
</head>
<body>
<div id="searchContainer">
<form action="http://google.ca/search" method="GET" >
<input id="field" type="search" name="q" size="20" placeholder="Google Search" autofocus />
<input id="submit" name="submit" type="submit" value="Search" />
</form>
</div>
</body>
</html>
Thank you!
This is hard-coded in Chrome to match behavior of the built-in newtab.
It can't be changed but an official workaround is to redirect via location to another URL. The address bar will show a full chrome-extension:// URL though.
manifest.json:
"chrome_url_overrides": {
"newtab": "focus.html"
},
focus.html:
<script src=focus.js></script>
focus.js:
location = 'start-focused.html';
start-focused.html will have the actual contents of your newtab UI.

405 Get not allowed on apache authentification

I am trying to create an Auth Form for my localhost Web Server, and every time I am trying to make it works I am getting this error :
Method Not Allowed
The requested method GET is not allowed for this URL.
Well, I understand that it can't take get into consideration, but I don't really know how to resolve the problem and I don't find any example. Any help will be appreciated.
htaccess :
SetHandler form-login-handler
AuthFormLoginRequiredLocation "http://example.com/login.html"
AuthFormLoginSuccessLocation "http://example.com/admin/index.html"
AuthFormProvider file
AuthUserFile "conf/passwd"
AuthType form
AuthName /admin
Session On
SessionCookieName session path=/
And my html form :
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<form method="POST" action="/">
<input type="text" name="httpd_username" value="" />
<input type="password" name="httpd_password" value="" />
<input type="submit" name="login" value="Login" />
</form>
</body>
</html>

input type file not showing icloud option on file browser for ios in cordova application

i am using the file input control to browse a file in my cordova application.On ios i also need to list out icloud option but it is not listing the icloud option on ios platform
<html>
<head>
<title>input file test</title>
</head>
<body>
<form id="form">
<input name="myfile" type="file" onchange="angular.element(this).scope().uploadDoc()" class="image-selection" size="30" id="uploaddoc" />
</form>
</body>
</html>

In My MVC 5 project, i can't access static html page when working on Local IIS

I have a simple ASP.NET MVC 5 project, i created a folder called static then created this html page inside it > static.html:
<!DOCTYPE html>
<html>
<head>
<title>Hello </title>
<meta charset="utf-8" />
</head>
<body>
<form action="/Customer/HelloTest" method="post">
<input type="text" value="ID"> <input type="text" name="Id" />
<input type="text" name="username" />
<input type="text" name="customers[0].id" />
<input type="text" name="customers[0].username" />
<input type="text" name="names" />
<input type="text" name="names" />
<input type="submit" />
</form>
</body>
</html>
I hosted this application on IIS.
When i run the solution and try to open the page like this:
http://localhost/FirstMVCWebApp/static/static.html
I faced only a blank page, so i don't know why this didn't open my html page, is this related to routing, should i put any route configurations or what?
I think the peoblem related to IIS as when i used IIS Express to run my web application instead of local IIS host, every things worked correctly.
You can use Url.Content() to open your static html page as below:
Open Static Page
OK, That's my answer to my question, i found that this issue didn't related to MVC, its related to IIS.
When IIS get the HTTPRequest, the first thing IIS do is to search for appropriate handler to handle it.
Handlers have lot of details, but the issue here is the handler for any static page called 'StaticFile' get the extensions of the static file that it can handle from 'MIME Types', and 'MIME Types' is a configurations located in IIS, but in my case there was no MIME Types to specify the extensions of static file so i goto and install it from Add features in control panel > IIS > StaticContent feature