AjaxcontrolToolkit does not work after deploy to the Windows Server - webforms

I had a problems of AjaxcontrolToolkit does not work after deploy to the Windows Server.
The application with AjaxControlToolkit, its work at my machine, after deploy to Server , its diid not work.
Here with my source code (Default.apsx)
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
<cc1:ComboBox ID="ComboBox1" runat="server" DropDownStyle="DropDownList" AutoCompleteMode="SuggestAppend" DataSourceID="SqlDataSourceEng" DataTextField="R1" DataValueField="EngagementCode" MaxLength="0" AutoPostBack="True" class="WindowsStyle" Width="400px" OnSelectedIndexChanged="ComboBox1_SelectedIndexChanged" AppendDataBoundItems="True" >
<asp:ListItem Value="0" Text="" Selected="True"></asp:ListItem>
</cc1:ComboBox>
Inside the Web.config
<controls>
<add tagPrefix="cc1" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
</controls>
Here with the result before deploy to the Windows Server 2012.
Here with the result after deploy to the Windows Server 2012.
Anyone facing the same issue?

I use EnableCdn in ScriptManager
<asp:ScriptManager ID="ScriptManager2" runat="server" EnablePartialRendering="true" EnableCdn="true"></asp:ScriptManager>
and
the section
<script src="https://ajax.aspnetcdn.com/ajax/4.5.2/1/WebForms.js" type="text/javascript"></script>
<script src="https://ajax.aspnetcdn.com/ajax/4.5.2/1/MicrosoftAjaxWebForms.js" type="text/javascript"></script>
<script src="https://ajax.aspnetcdn.com/ajax/4.5.2/1/MicrosoftAjax.debug.js" type="text/javascript"></script>
<script src="https://ajax.aspnetcdn.com/ajax/4.5.2/1/MicrosoftAjaxTimer.debug.js" type="text/javascript"></script>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.0.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.5.0.min.js"></script>
References:
https://learn.microsoft.com/en-us/aspnet/ajax/cdn/overview#ajaxmicrosoftcom_renamed_to_ajaxaspnetcdncom_18

Related

SpringMVC - cann't able to acces JS and CSS file in index.jsp

I have added
<mvc:resources mapping="/webapp/**" location="/webapp/" />
<mvc:default-servlet-handler />
in my dispatch-servlet.xml
my folder hierarchy is
enter image description here
and in index.jsp i declared
<spring:url value="/webapp/resources/js/bootstrap.min.js" var="bootstrapJS" />
<script src ="${bootstrapJS}" type="text/javascript"></script>
can any one tell the actuall issue is with code or folder hierarchy
Hi have you included the tag at the top of index.jsp it will look something like this. <%# taglib prefix="spring" uri="http://www.springframework.org/tags"%>

Angular 2 + Codeigniter - Linked CSS and JS not loading on WAMP?

I followed the latest Angular 2.0 quickstart guide and everything is up to date. My application runs fine locally using lite-server, but all of my CSS and JS resources get 404 errors when I run it on WAMP. The index.html application page is the only thing that loads.
My folder structure is:
my-project/
application/
views/
pages/
app/
assets/
css/
reset.css
node-modules/
index.html head:
<head>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="assets/css/reset.css" />
<link rel="stylesheet" type="text/css" href="assets/css/main.css" />
<link rel="stylesheet" type="text/css" href="assets/css/menu.css" />
<!-- 1. Load libraries -->
<!-- Polyfill(s) for older browsers -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>
Thanks.

Import extJs to JSP

I am using Spring tool suite and I created MVC application. Now I'd like to move to ExtJs with this concept.
But I am not able to include extJs files into JSP.
My servlet looks like this:
<mvc:resources mapping="/resources/**" location="/resources/" />
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="net.codejava.spingextjs" />
my JSP looks like this:
<%# taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%# page session="false" %>
<html>
<head>
<link href="resources/css/ext-all.css" rel="stylesheet">
<script src="extjs/ext-debug.js" type="text/javascript"></script>
<script src="app/app.js" type="text/javascript"></script>
</head>
<body>
</body>
Folder tree looks like this:
However page won't load and firelogger says that /extjs/ext-debug.js and app/app.js is not located on server (404 on these files). I use tomcat and trying it on localhost.
So my question is, what should I do to import ExtJs in JSP, or should I change home.jsp to home.html (tried this, didn't helped)?
I already made the ExtJs app using static web page and loading in html, however I am not able to force server to load ExtJs using MVC concept.
Your js/css/images need to be located in the resources folder.
There are a bunch of examples of using ExtJS with Spring MVC out there:
https://github.com/loiane/extjs-crud-grid
It relies on an older version of Ext but it's a nice boilerplate.
Cheers
You may need to MOVE extjs/ext-debug.js and app/app.js into the resources directory because the other locations will be handled by a dispatcher servlet.
OR, if you do not want to move these files, then add two line in your servlet configuration.
<mvc:resources mapping="/resources/**" location="/resources/" />
<mvc:resources mapping="/extjs/**" location="/extjs/" />
<mvc:resources mapping="/app/**" location="/app/" />
<beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<beans:property name="prefix" value="/WEB-INF/views/" />
<beans:property name="suffix" value=".jsp" />
</beans:bean>
<context:component-scan base-package="net.codejava.spingextjs" />
If it does not solve the problem after you have moved or added two lines in the configuration file, then try the jstl c:url tag like below.
<%# taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%# page session="false" %>
<html>
<head>
<link href="<c:url value='/resources/css/ext-all.css' />" rel="stylesheet">
<script src="<c:url value='/extjs/ext-debug.js' />" type="text/javascript"></script>
<script src="<c:url value='/resources/css/ext-all.css' />app/app.js" type="text/javascript"></script>
</head>
<body>
</body>

Joomla template folder not showing in template manager

I am trying to create a template.I have created a folder for template in templates folder and also created two files index.php and templateDetails.xml
My index.php has following code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" >
<head>
<jdoc:include type="head" />
</head>
<body>
<jdoc:include type="component" />
</body>
</html>
and templateDetails.xml has following code which yes I copied because beginner.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE install PUBLIC "-//Joomla! 1.5//DTD template 1.0//EN"
"http://dev.joomla.org/xml/1.5/template-install.dtd">
<install version="3.1.5" type="template">
<name>template _tut</name>
<creationDate>31-01-2009</creationDate>
<author>Nettut Fan</author>
<authorEmail>your#email.com</authorEmail>
<authorUrl>http://www.siteurl.com</authorUrl>
<copyright>You 2009</copyright>
<license>GNU/GPL</license>
<version>1.0.0</version>
<description>Template Tut</description>
<files>
<filename>index.php</filename>
<filename>templateDetails.xml</filename>
<filename>css/template.css</filename>
</files>
<positions>
<position>breadcrumb</position>
<position>left</position>
<position>right</position>
<position>top</position>
<position>user1</position>
<position>user2</position>
<position>user3</position>
<position>user4</position>
<position>footer</position>
</positions>
</install>
My joomla version is 3.1.5 and despite doing above mentioned steps my template folder is not showing in template manager.
You need to install the template to register it completely.
There are 2 ways of doing this:
Download your files, zip them up and install it as you would any other extension.
In the Joomla backend, go to "Extension Manager", then "Discover". This will detect uninstalled extensions and should bring your template up in the list. check it and install it
Hope this helps

Tiles 2.2 put-list-attribute + Spring 3.1.4

I am migrating our application from struts 1.3 to spring 3.1.4 mvc. In the process i am also upgrading from tiles 1.1 to tiles 2.2. Jstl version is 1.1. With Tiles 2.2, i am having an issue about using put-list-attribute. I am trying to show a simple jsp page which should does following:
a) Header : include bunch of css (i commented it out as it doesn't work. Using firebug i see error "NetworkError: 404 Not Found - http://localhost:8080/appname/%BeachStyle%7d" --- {eachStyle}
No idea where %BeachStyle% came from.
b) Header : include title -- Works fine
c) body : show static text
tiles.xml
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
"http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
<tiles-definitions>
<definition name=".login" preparer="com.tiles.LoginController"
template="/tiles/layouts/layoutmain.jsp">
<put-attribute name="pageTitle" value="vivi test" />
<put-list-attribute name="baseStylesTest">
<add-attribute value="/styles/css/grids.css"/>
<add-attribute value="/styles/css/superfish.css"/>
<add-attribute value="/styles/css/styles.css"/>
</put-list-attribute>
</definition>
</tiles-definitions>
layoutmain.jsp
<%# taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%# taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%# taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<tiles:useAttribute id="stylesList" name="baseStylesTest" classname="java.util.List"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%-- <c:forEach var="eachStyle" items="${baseStylesTest}">
<link type="text/css" rel="stylesheet" href="<c:out value='${eachStyle}'/>" /> --%>
<title><tiles:insertAttribute name="pageTitle" /> </title>
</head>
<body>
Login page body
</body>
</html>
I tried the following:
i) Checked the tiles2.2 dtd and example to use it - found similar usage
ii) Checked examples over internet and how it's being used - found similar usage
iii) Checked how its used with struts -- found they use #attr.xxx as it is in pagescope
I don't see anything wrong in my implementation. The title attribute is rendered properly but on the attribute belonging to put-list-attribute.
Any help is much appreciated.
Found the solution. JSTL wasn't working as i declared my web-app version to be 2.5. This is not compatible with tomcat5.5 which i was using. Changed the web-app version to be 2.4 and all is good.
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
---
</web-app>

Resources