all #RequestMapping into header page (SPRING MVC) - spring

how to get all #ReqpuestMapping
i have a header page and some other pages
my header page has sidebar menus, i want to display my menu into all pages
Thanks
Pradeep

If following is what you are trying to do, Apache Tiles is well suited for you requirement.
Apache Tiles™ is a templating framework built to simplify the
development of web application user interfaces.
Tiles allows authors to define page fragments which can be assembled
into a complete page at runtime. These fragments, or tiles, can be
used as simple includes in order to reduce the duplication of common
page elements or embedded within other tiles to develop a series of
reusable templates. These templates streamline the development of a
consistent look and feel across an entire application.
It also integrates well with spring. You can start looking at the Spring reference to integrate with Apache tiles. A simple tutorial here.

If you are using some Layout Frameworks like Tiles, etc then you can configure your layout in xml configuration files.
or if you are not using any Layout Framework, and you are using plain jsp pages then create separate pages like header.jsp, footer.jsp, menu.jsp and include these pages in all your other pages, wherever required.
Ex.
<body>
<table>
<tr>
<td>
<jsp:include page="menu.jsp"/>
</td>
</tr>
<tr>
<td>
Actual page code will go here
</td>
</tr>
<tr>
<td>
<jsp:include page="footer.jsp"/>
</td>
</tr>
</table>
</body>

Related

Ajax calls without AjaxHelper in aspnet core 2

I was trying to implement an asynchronous call with ajax in my aspnet core 2.0 project, using "Ajax.BeginForm", but then I discovered according to these threads on github and stackoverflow that there's no support to this class in aspnet core, nor MVC 6.
Is there any other way to use ajax assynchronous calls, in aspnet core, besides the old way, with $.ajax function? My problem with this, is that, with AjaxHelper class, I could do everything with razor, in the view file, and keeping everything organized in one place.
Why would i use the razor language to make a loop, and print a list, or whatever, if i have to to make the ajax call, in the js file (or in a < script > tag)? I could work with the data right there, with js, and keep everything there!
How are you guys solving this right now? Thanks for your help.
This baffled me a bit too. I was like where is my lovely #Ajax helper that saved me allot of time in JS hell.
As #sam linked they have changed the API to be more HTML 5 semantic - Not sure why but OK
<form asp-controller="Home" asp-action="SaveForm"
data-ajax-begin="onBegin" data-ajax-complete="onComplete"
data-ajax-failure="onFailed" data-ajax-success="onSuccess"
data-ajax="true" data-ajax-method="POST">
<input type="submit" value="Save" class="btn btn-primary" />
<div id="Results"></div>
</form>
You can also do the same on anchors and don't forgot the tag to enable it
<a data-ajax="true" data-ajax-begin="alert('Hello!')">TEST</a>
And then I suppose you could create TypeScript files per page similar to Angular or one TypeScript per site, or just put the script on the page, example
var onSuccess = function(context){
alert(context);
};

Check artifacts status on maven local repository

There are any way to check if the artifacts in the local maven repostiry are valid?
Some artifacts in my local repostory has a valid name (artifact.jar) but the content is html with error messages (the artifacts were downloaded from codehaus or openqa repositires, offline currently):
<html>
<head>
<title>OpenQA, RIP (2006 - 2013)</title>
</head>
<body>
<h1>Looking for a different OpenQA?</h1>
<p>
There are a few other projects with similar names. They are not related to this OpenQA but they are still very cool projects. Check them out!
</p>
<ul>
<li>openQA by openSUSE, automated tests for operating systems</li>
<li>openQA by AKSW, an open source question answering framework</li>
</ul>
<h1>Looking for an OpenQA project?</h1>
<p>
Unfortunately, OpenQA has seen its final days. Started originally by some of the great minds of open source
test automation, it had a great run and supported some of the best open source test automation projects out there:
</p>
<ul>
<li>Selenium</li>
<li>Watir</li>
<li>Session Tester</li>
<li>Pylot</li>
<li>Floyd</li>
<li>pyWinAuto</li>
<li>Frankenstein</li>
<li>Watir Recorder</li>
<li>WET</li>
<li>JTC</li>
</ul>
<p>
Some of these projects have moved on: Selenium and Watir survive as a standalone projects while others have evolved in to new efforts and have found new homes. But others have been left stagnant for years and were unfairly misleading to users, giving the impression that they were viable projects even though no one had been involved in years.
</p>
<p>
Rather than continue to mislead developers about the state of the projects, we've decided to lay it all out there
and hope that the interesting projects will eventually get forked and live again on another site such as Google Code, Github, or Bitbucket.
</p>
<h1>So what now?</h1>
<p>
If you're looking for information on the following projects, you can find more information at it's new home:
</p>
<table>
<thead>
<tr>
<th>Project</th>
<th>New Home</th>
</tr>
</thead>
<tbody>
<tr>
<td>Selenium</td>
<td>http://docs.seleniumhq.org/</td>
</tr>
<tr>
<td>Watir</td>
<td>http://watir.com/</td>
</tr>
<tr>
<td>CubicTest</td>
<td>http://www.cubictest.org/</td>
</tr>
</tbody>
</table>
<p>
If you're looking for information on a project not listed, that means it's not actively maintained. That doesn't
mean the project is useless, it just means no one runs it right now. But some projects are still certainly useful,
so
the following may help you better use it.
</p>
<h2>Project Websites</h2>
<p>
We recommend using the Internet Archive Wayback Machine to browse around the old project sites, which are no longer
hosted here. Follow this link
to see what the site looked like in June, 2013.
</p>
<h2>Downloads</h2>
<p>
For older downloads, the best place to look is in the public Maven repository. Search for "openqa" or the specific project name (ie: "selenium").
</p>
<h2>Bug Tracker and Wiki</h2>
<p>
Again, we recommend the Wayback Machine for the old <a
href="http://web.archive.org/web/20130116202849/http://jira.openqa.org/secure/Dashboard.jspa">JIRA
instance (bug tracker)</a> and Confluence instance (wiki).
</p>
<h1>Final Words</h1>
<p>
While it's sad to finally put OpenQA to bed, we hope this announcement at least gives clarity on the status of
the projects. If you have questions that aren't answered on this page, you can email openqa#lightbody.net but we can't
guarantee that we can answer your question. We will try to keep this page updated with more information as it comes
up.
</p>
</body>
</html>
I was thinking to get a sha1 string of all artifacts and compare it with the artifact.pom.sha1 file content. Some another ideas? There are any maven command line parameter to do that?
My maven version is 3.3.9.
The nearest solution I think of is to purge the local repository and then re-resolve it (Maybe a little hard, I know).
http://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html

where I can change the links to social icons in Joomla?

I do not know Joomla, but I had one task in exsiting site, to change the link of social button, linkedin.
I thought it was simple task, but I wasted 2 days for it, looking in files and interface. Can you help me please, or just give me ideas where these social links can be placed.
version of Joomla is 2.5.14
<div class="custom">
<p style="text-align: right;">
Site Map
<img src="/images/siteImages/lnicon.png" border="0" alt="">
</div>
Thanks in advance)
you are my last chance :)
found the links in Module Custom HTML module, in administration panel.

Customizing the Okta Footer

I am trying to customize the footer that contains the support links etc. There is an option to enable/disable but I want to customize it so that I can add my own links or code in there.
Does anyone have any suggestions?
Currently, Okta only supports enable and disable of the footer.
You can, however, host a custom page and include an <iframe></iframe> with the source as https://{your-org}.okta.com/app/UserHome?iframe=true&iframeControlHideAll=true.
Example:
<body>
<iframe src="https://{your-org}.okta.com/app/UserHome?iframe=true&iframeControlHideAll=true"; frameborder="0" width="100%" height="100%"></iframe>
</body>
Another option is to completely build your own portal with a custom look and feel using the Okta API.

Tag <a name> on portlet rendering in Websphere Portal

I need an information about the portlet management in Websphere portal (6.1.5, but I think is the same for all versions)..
When the portal render a portlet, the html created has this structure:
<td>
<a name="7_SOMECHARANDNUMBERS"></a>
<div class="wpsPortletBody"><portletapi:init/>.....
I need to know what is the tag <a name=""> and what is the element referred to the name attribute value.
Thanks!
Bye!!
That's the portlet's identifier. Portal generates a unique ID for each portlet that it renders on a page so that there's no namespace collision between portlets. See this link in the infocenter: http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1/index.jsp?topic=/com.ibm.wp.ent.doc_v6101/dev/wpsbsoutput.html

Resources