How to include properly a css file in jsp - eclipse

I tried this :
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" />
but the css won't apply. :(
Am i missing something obvious ?
EDIT :
Here is my jsp :
<%# page pageEncoding="utf-8"%>
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Log-in</title>
<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" />
</head>
<body>
<div class="login-card">
<h1>Log-in</h1><br>
<form>
<input type="text" name="user" placeholder="Username">
<input type="password" name="pass" placeholder="Password">
<input type="submit" name="login" class="login login-submit" value="login">
</form>
<div class="login-help">
Register • Forgot Password
</div>
</div>
</body>
</html>

Try this:- <jsp:include page="style.css"/>
Using the include directive should do the trick.

<link type="text/css" rel="stylesheet" href="css/style.css"/>
try this, will work. In java it ma

Related

idtabs not working with ads script on same page

Im using idtabs jquery library and when i put ads on the page, the script stops working. I tried plain script with only idtabs and google adsense code. If I run the script on my localhost, it runs ok (because adsense doesnt show), but once i upload it on server, the ads shows and the script id tabs wont work. Anyone know how to solve this?
<!DOCTYPE html>
<body>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script>
<script type="text/javascript" src="scripts/jquery.idTabs.js"></script>
~~google adsense code here
</head>
<body>
<div class="usual">
<ul class="idTabs" >
<li><a class="selected" href="#tab1">Tab 1</a></li>
<li>Tab 2</li>
<li>Tab 3</li>
</ul>
<div style="display:block;" id="tab1">This is tab 1.</div>
<div style="display:none;" id="tab2">More content in tab 2.</div>
<div style="display:none;" id="tab3">Tab 3 is always last!</div>
</div>
</body>
</html>

How to, with outlook client, perform reply with a HTML button?

I'm developing one WPF application with email integration.
The emails generated by application are simply HTML pages like that:
<!DOCTYPE html>
<html>
<head>
<title>My Title</title>
<meta charset="utf-8" />
<style type="text/css">
</style>
</head>
<body>
<div>
<div class="actions">
Approve
Reject
</div>
</div>
</body>
</html>
I need to know how to create one HTML button that can perform automatically reply with outlook.
Can you help me?
Thanks
HTML in Outlook is rendered by Word, not IE. Your HTML scripts and buttons will not run inside Outlook.
<!DOCTYPE html>
<html>
<head>
<title>My Title</title>
<meta charset="utf-8" />
<style type="text/css">
</style>
</head>
<body>
<div>
<div class="actions">
<button onclick="location.href='mailto:myemail#mail.com?subject=Approve'">Approve</button>
<button onclick="location.href='mailto:myemail#mail.com?subject=Reject'">Reject</button>
</div>
</div>
</body>
</html>

Google complains image missing or invalid itemtype

No matter how I mark up the image, Google complains that the image is either missing or has an invalid itemtype.
<html itemscope itemtype="http://schema.org/Article">
<head>
...
<link itemprop="image" href="https://www.example.com/image.jpg" />
</head>
<body>
<img itemprop="image" src="https://www.example.com/image.jpg" />
</body>
</html>
How do I add an image to an article?
Schema.org’s image property can have a URL (this is what you do) or an ImageObject as value.
For Google’s Articles Rich Snippet, Google seems (according to their documentation and their testing tool) to support only the variant with ImageObject.
So if you want to get that Rich Snippet, you might have to use something like this instead:
<body itemscope itemtype="http://schema.org/Article">
<div itemprop="image" itemscope itemtype="http://schema.org/ImageObject">
<img itemprop="url" src="https://www.example.com/image.jpg" />
<meta itemprop="height" content="20" />
<meta itemprop="width" content="20" />
</div>
</body>

yii 1.1 select2 jquery conflict with yii jquery

I am working on a project in yii, in which i am using jquery select2 extension, I have created a searchable dropdown list using select2 extension in localhost/business/package/create page, now when i want to create a package the drop down list just becomes drop down, not searchable, unless i remove this line from my layout <script src="<?php echo Yii::app()->request->baseUrl;?>/js/jquery.js"></script>. After that i can create the package,with my seachable drop down list, but my rest of the pages are not scrolling. If i open the view source of package/create these files are already added
<script type="text/javascript" src="/businessadvisor/assets/f81f8ab/jquery.js"></script>
<script type="text/javascript" src="/businessadvisor/assets/1075462/select2.js"></script>
so the crux is a because of a single file, my rest of the pages are not scrolling, nor clicking etc. so what is the solution to deal with this conflict.
You are including jQuery multiple times, so the second inclusion will overwrite all the already included plugins.
You can use the scriptMap option to specify the location of jQuery for the whole site.
'components'=>array(
...
'clientScript'=>array (
'scriptMap'=>array(
'jquery.js'=>'//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js',
),
...
),
...
),
Ok here is the answer. The problem was, when i commented out <script src="<?php echo Yii::app()->request->baseUrl;?>/js/jquery.js"></script> from my admin.php (my layout), drop down in package/createstart working, while the rest of the pages becomes stuck, not scrolling nor clicking. so one file was creating a whole problem, to solve this, you need to go into your custom.jsand replace $ with jQuery and save it. Now I had below files under my footer widget.
<!-- <script src="<?php echo Yii::app()->request->baseUrl;?>/js/jquery.js"></script>-->
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/bootstrap.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/slimmenu.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/bootstrap-datepicker.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/bootstrap-timepicker.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/nicescroll.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/dropit.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/ionrangeslider.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/icheck.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/fotorama.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/typeahead.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/card-payment.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/magnific.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/owl-carousel.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/fitvids.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/tweet.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/countdown.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/gridrotator.js"></script>
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/custom.js"></script>
I commented out <!-- <script src="<?php echo Yii::app()->request->baseUrl;?>/js/jquery.js"></script>-->jquery and in header of my layout having these files
<head>
<title>Business Advisor,Where you give ratings and reviews</title>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta name="keywords" content="Template, html, premium, themeforest" />
<meta name="description" content="Traveler - Premium template for travel companies">
<meta name="author" content="Tsoy">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- GOOGLE FONTS -->
<link href='http://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,600' rel='stylesheet' type='text/css'>
<!-- /GOOGLE FONTS -->
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/css/font-awesome.css">
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/css/icomoon.css">
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/css/styles.css">
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/css/mystyles.css">
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/modernizr.js"></script>
</head>
so what i did, i copied this code
<?php
$cs = Yii::app()->getClientScript();
$cs->registerCoreScript('jquery');?> <!-- put these files in admin.php so that conflcit will resolve from select2 extension select2.php-->
from my select2.php and paste in my header like this.
<head>
<title>Business Advisor,Where you give ratings and reviews</title>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta name="keywords" content="Template, html, premium, themeforest" />
<meta name="description" content="Traveler - Premium template for travel companies">
<meta name="author" content="Tsoy">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- GOOGLE FONTS -->
<link href='http://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,600' rel='stylesheet' type='text/css'>
<!-- /GOOGLE FONTS -->
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/css/bootstrap.min.css">
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/css/font-awesome.css">
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/css/icomoon.css">
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/css/styles.css">
<link rel="stylesheet" href="<?php echo Yii::app()->request->baseUrl;?>/css/mystyles.css">
<script src="<?php echo Yii::app()->request->baseUrl;?>/js/modernizr.js"></script>
<?php
$cs = Yii::app()->getClientScript();
$cs->registerCoreScript('jquery');?> <!-- put these files in admin.php so that conflcit will resolve from select2 extension select2.php-->
</head>
Now the jquery has been registered. and now my every page, even package/create
is working, every thing is scrolling, no conflict at all. Cheers :)

How can I create and manage playlist in phonegap? (audio/Video files)

I am trying to create a playlist in phonegap application for iPhone. I don't have any idea regarding this, I am totally new to this issue, I am not getting any thing, can any one help me out to solve this issue?
This may help you
Use PhoneGap Media API & jQuery Mobile UI Framework
Here is the code:
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=screen.width; user-scalable=no" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Audio Player</title>
<!-- NOTE: The following 4 lines are inserted by the project wizard -->
<link rel="stylesheet" href="jquery.mobile/jquery.mobile-1.0.css" type="text/css">
<script type="text/javascript" src="jquery.mobile/jquery-1.6.4.min"></script>
<script type="text/javascript" src="jquery.mobile/jquery.mobile-1.0.js"></script>
<script type="text/javascript" charset="utf-8" src="phonegap-1.3.0.js"></script>
</head>
<body>
<div data-role="page" data-theme="a" id="page-home">
<div data-role="header" data-nobackbtn="true" data-theme="e">
<h1>Audio Player</h1>
</div> <!-- /header -->
<div data-role="content" id="content-manual" data-theme="a">
<div data-role="button" id="playaudio" data-theme="e">Play</div>
<div data-role="button" id="pauseaudio" data-theme="e">Pause</div>
<div data-role="button" id="stopaudio" data-theme="e">Stop</div>
<div class="ui-grid-a">
<div class="ui-block-a"> Current: <span id="audio_position">0 sec</span></div>
<div class="ui-block-b">Total: <span id=media_dur>0</span> sec</div>
</div><!-- /grid-a -->
</div> <!-- /content-manual -->
</div> <!-- /page -->
</body>
</html>