I am using Struts 1.I have a taglibrary
<%# taglib prefix="s" uri="/WEB-INF/struts-tags.tld" %>
This tag library works only in Struts 2.0 Framework.This has a tag which I have used in my application.Now when I had to backtrack to Struts 1 I got an error
Could not parse deployment descriptor:
java.io.IOException: cannot resolve
'/WEB-INF/struts-tags.tld' into a
valid tag library probably occurred
due to an error
Can anyone suggest how to use in struts 1
<%# taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
Then use html:select with the appropiate attributes as explained in the official documentation.
<html:select property="...">
...
</html:select>
Related
I followed the steps provided in the wiki to install smartedit.
After installation of the same.. I tried to access the smartedit url https://localhost:9002/smartedit. But it is throwing 404 page and the following exception:
error expected mime type application octet stream but got text
<html>
<head>
<meta http equiv="Content Type" content="text/html;charset=utf 8"/>
<title>Error 404 Not Found</title>
</head>
<body>HTTP ERROR 404
<p>Problem accessing /solr/master_backoffice_backoffice_product_flip/update. Reason:Not Found
</body>
</html>
We were using 6.3 earlier where we did not use smartedit. Now we are upgrading to 1811 and are trying to have smartedit functionality. Any leads would be appreciated.
Thanks.
To make sure, you have properly installed this extension, you have to head up to hAC->Platform->Extensions and check if you can see smartedit on the list (see the uploaded screnshot). If there's no sign of smartedit, you have failed to install it properly.
screenshot
A friend of mine has a website with this doctype:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
I know it is an old doctype.
The problem is, that on the contact page it gives a Data-Role error in the W3C Validator.
The contact form is from 123contactform. I already contacted them, but they only come up with the solution to change the doctype.
For now I don't want to do that, because then I get a lot of other errors, that I have to fix.
How can I change the Data-Role error? Here is the error in the W3C Validator: https://validator.w3.org/check?uri=http%3A%2F%2Fwww.maryderekboedelopruiming.nl%2Fcontact.htm&charset=%28detect+automatically%29&doctype=Inline&group=0
I decided to change the doctyp. All is well now.
I have built a Node.JS app (meaning I wrote my own HTTP server within the the main JS file, which works as it should with the rest of the application). The HTML and CSS renders as it should within localhost. Even JQuery works (with the source file imported via CDN). However, I have tried adding very basic AngularJS within the Index.html page and the AngularJS refuses to show (anywhere) in my localhost. It should be showing the number "3", but does not.
This is my Index.html page with the angular code:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{{title}}</title>
<link rel="stylesheet" href="/css/home.css">
<script src="/node_modules/angular/angular.js"></script>
<script src="/node_modules/angular-route/angular-route.js"></script>
</head>
<body>
<body ng-app>
<p>AngularJS code: {{ 1 + 2 }}</p>
</body>
<div class="hm-container">
<h1 class="hm-title">Some text</h1>
</div>
</body>
</html>
The console log message in chrome says:
"Failed to load resource: the server responded with a status of 404 (Not
Found) http://localhost:3000/node_modules/angular/angular.js"
The Index.html page renders the Angular code correctly only as a standalone isolated HTML page (without the CSS) when tested within my Brackets text editor browser preview and when tested as a stand alone HTML file using the HTTP-Server module. It correctly shows the number "3". So I know my angular code itself is not the issue here. In my localhost the HTML page does not show the number "3", nor does it even show "{{ 1 + 2 }}". It simply reads: "AngularJS code:" with the rest of the HTML and CSS etc.
Even importing the AngularJS source file via CDN, or downloading the AngularJS source file from Angular's site, instead of from NPM does not make any difference. I have played with the directory structure as well per some of your recommendations, with no luck. So I know it is not the file path of the Angular source file which is the issue.
I have been stuck on this for too many days, have lost sleep, and foregone all other activities all because of this, so If any of you can give me your input as to what is going on and how to resolve this issue, I would be extremely grateful!!! :)
Alright, this is how I solved the issue. It was a server-side issue as I had originally suspected. Within the main Node.JS file (typically either named server.js or app.js) the following is needed:
you will most likely already have this part...
var express = require('express'),
app = express();
Then immediately after the above code block skip a few lines and add...
app.use(express.static(__dirname + '/views'));
Apparently this is how Express knows where to serve your JS files. The 'views' folder is where my HTML pages are. You may have them in a folder named 'public'.
The solution to the following link is what helped me solve the issue: AngularJS Code not working with NodeJS
I will add that this is definitely strange to me in that JQuery works by importing it's source file via CDN WITHOUT THE ABOVE CODE CHANGE, yet Angular would not work via both a locally downloaded Angular source file OR via the Angular CDN! If I ever figure out why this is so, I will be sure to update this answer. If any of you Angular, Node, Express experts know why this is so, please enlighten us all!
Hopefully this helps someone running into a similar issue. A big thanks to the two of you that tried to help me solve this weird issue. Your time and input was greatly appreciated!
There is problem obviously in attaching Angular JS to your index. You have already said that you even tried attaching through CDN.
<!DOCTYPE html>
<html>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<div ng-app="">
<h1> {{1+2}} </h1>
</div>
</body>
</html>
This works, I have checked. Try to integrate your stuff in this code. And follow Jason's suggestion to attach angular js from your system only. Keep the angular js file within the same folder.
To make that work, you need a directory structure like this:
|--app
| |--index.html
| |--node_modules
| | |--angular
| | | |--angular.js
| | |--angular-route
| | | |--angular-route.js
| |--css
| |--home.css
We are working in a project which uses Symfony2 + AngularJS.
Each one in a different domain (api.domain for Symfony2 and www.domain for the Angular project).
Now we are focusing on the SEO part. We use Prerender.io to create static snapshots to serve a good HTML Raw page to crawlers.
But the problem is when serving the "404 Page" on Angular:
$urlRouterProvider
.otherwise('/404');
The thing is, what we do is redirecting a nonexistent page to our "404 Page" with a 200 Header Status Code, which is very bad for SEO purposes...
Since AngularJS is not capable of generating, we have already tried 2 things:
1. Use a redirection with htaccess / Apache:
RedirectMatch 404 "/404"
2. Call to a web service which return us a 404 error:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>404 Not Found</title>
</head>
<body>
<h1>Not Found</h1>
<p>The requested URL /do-not-access was not found on this server.</p>
</body>
</html>
And for the AngularJS side we tried to throw the header status code without success:
return $http.get(ENV.apiEndpoint + '/do-not-access');
None of this worked for us...
We also though about using a second "404 Page". The idea was redirecting our first 404 page to this second 404 page via htaccess with a 404 status code, but we think that will not work due to AngularJS internal redirection:
200 -> 301 -> 404
PS: I found: AngularJS html5mode and hard 404 which says "we have to configure our server to make a routing exception for your custom 404 page" but we really have no clue how to do it...
Are we focusing in a bad way?
There is other option?
How we can handle it?
Any ideas?
It seems that prerender.io offers a way to handle http header status.
For example, for a 404 page we just need to add this meta tag into our head tag:
<meta name="prerender-status-code" content="404">
Docs: https://prerender.io/documentation/best-practices
I have developed Drupal site . But when I access my site using HTTPS:// browser gives me a message "This page has insecure content" . I have putted my site data on secure site .
I load JS file in that page for some purpose.
So,Is it JS file issue?
I don't think it should be JS or CSS issue, unless you include them using absolute URLs:
For example if you add the following lines in your theme's template file:
<link rel="stylesheet" type="text/css" href="http://yoursite/mystyle.css">
<script src="http://yoursite/myScript.js"></script>
This serves the JavaScript through http instead of https. Instead you should use:
<link rel="stylesheet" type="text/css" href="mystyle.css">
<script src="myScript.js"></script>
notice that the URLs in the second piece of code contains relative URL, and would serve the files with the same protocol with which the site is accessed via a browser.
If this is not the case, you have to scan through all the links on the page, and find the links which are start with the format http://... instead of https://.... This problem arises when a browser finds that not all content of the page is being served using encryption.
Hope that makes sense. Please feel free to ask further queries.
Indeed, you might have some assets (css or javascript) loaded from "non secure" source (using http protocol instead of https).