How to map home url (/) - openshift

I have successfully deployed my .WAR file to openshift.com.
In order to access my website, I have to type this url: http://demo-farazdurrani.rhcloud.com/main
You see that after ".com" I have to type "/main". When I only type the website name without '/main', it throws '404 resource not found' error. I just want to be able to just type http://demo-farazdurrani.rhcloud.com/ (or better yet remove that '/' too) and it should automatically open my main home page.
This is my web.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
metadata-complete="false">
<display-name>Advanced Mappings Demo Application</display-name>
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<url-pattern>*.jspf</url-pattern>
<page-encoding>UTF-8</page-encoding>
<scripting-invalid>true</scripting-invalid>
<include-prelude>/WEB-INF/jsp/base.jspf</include-prelude>
<trim-directive-whitespaces>true</trim-directive-whitespaces>
<default-content-type>text/html</default-content-type>
</jsp-property-group>
</jsp-config>
<session-config>
<session-timeout>30</session-timeout>
<cookie-config>
<http-only>true</http-only>
</cookie-config>
<tracking-mode>COOKIE</tracking-mode>
</session-config>
And this is my onStartUp method (I configured it programmatically):
#Override
public void onStartup(ServletContext container) throws ServletException
{
AnnotationConfigWebApplicationContext rootContext =
new AnnotationConfigWebApplicationContext();
rootContext.register(RootContextConfiguration.class);
container.addListener(new ContextLoaderListener(rootContext));
AnnotationConfigWebApplicationContext servletContext =
new AnnotationConfigWebApplicationContext();
servletContext.register(WebServletContextConfiguration.class);
ServletRegistration.Dynamic dispatcher = container.addServlet(
"springDispatcher", new DispatcherServlet(servletContext)
);
dispatcher.setLoadOnStartup(1);
dispatcher.addMapping("/");
container.getServletRegistration("default").addMapping("/resources/*", "*.css", "*.js", "*.png", "*.gif", "*.jpg");
}
Any help is appreciated. Thanks

with spring applications usually what is suggested is to use a rewriter of url like:
in your web.xml
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>yourservlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>yourservlet</servlet-name>
<url-pattern>/app/*</url-pattern>
</servlet-mapping>
by default will read a urlrewrite.xml in your WEB-INF directory you'd have something similar to:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite
PUBLIC "-//tuckey.org//DTD UrlRewrite 3.0//EN"
"http://tuckey.org/res/dtds/urlrewrite3.0.dtd">
<urlrewrite default-match-type="wildcard">
<rule>
<from>/resources/**</from>
<to>/resources/$1</to>
</rule>
<rule>
<from>/spring_security_login</from>
<to last="true">/spring_security_login</to>
</rule>
<rule>
<from>/j_spring_security_check**</from>
<to last="true">/j_spring_security_check/$1</to>
</rule>
<rule>
<from>/j_spring_security_logout**</from>
<to last="true">/j_spring_security_logout/$1</to>
</rule>
<rule>
<from>/**</from>
<to>/app/$1</to>
</rule>
<outbound-rule>
<from>/app/**</from>
<to>/$1</to>
</outbound-rule>
</urlrewrite>
that should be enough, I use this very same configuration for a deployment in openshift! and works the way you want

Okay now I know how to do it. First step is this: https://stackoverflow.com/a/23981486/4828463 Although rename my .war file to ROOT.war was important, I was missing one important .jsp file at a important location (now this solution is particular to my problem. It is possible that it could be helpful to you as well). I added "index.jsp" at the root of my web application. And Inside it I have
<%# page session="false" %>
<c:redirect url="/main" />
The main thing that's needed here is the 2nd line. It will redirect all the calls to http://app-domain.rhcloud.com/ to http://app-domain.rhcloud.com/main, which I actually need. I just type http://demo-farazdurrani.rhcloud.com/ and it redirects it to http://demo-farazdurrani.rhcloud.com/main
First line is optional (not needed for my solution) and is doing this: It is needed page that doesn't need to be involved in a session. Or if this code is specified in a JSP page, it means session objects will not be available for that page. Hence session cannot be maintained for that page. (just putting it out there not neccassary for my question though).
I will show you how my project structure looks like now:
Earlier in the question I was asking if I need to change anything in web.xml. No I don't. Everything is fine there.
upvote the question and answer if you found this helpful. Thanks

Related

Add a block to product page by custom module without editing magento default template

I am trying to add a block to product page by using my custom module.
I do not want to modify any magento default files for this. I know it's possible by modifying the code in view.phtml template. Below is what I tried so far. I have copied the default magento view.phtml file in all module template folder as below. I included layout file inside config.xml of my module and written code for the block.
view.phtml file I placed under each template of module folder.
app/desifn/frontend/default/default/template/mymodule/view.phtml
config.xml file of module -
<frontend>
<routers>
<modulename>
<use>standard</use>
<args>
<module>Module_name</module>
<frontName>modulefrontname</ntNafrome>
</args>
</modulename>
</routers>
<layout>
<updates>
<modulename module="module_name">
<file>module.xml</file>
</modulename>
</updates>
</layout>
</frontend>
This file is under -
app/desifn/frontend/default/default/layout/modulename.xml
<reference name="product.info">
<block type="module_name/product_view" name="product_list">
<action method="setTemplate" ifconfig="module_name/sp_category/status">
<template>modulename/product/view.phtml</template>
</action>
</block>
</reference>
Node modulename is invalid (wrong closing tag)
<updates>
<modulename module="module_name">
<file>module.xml</file>
</module>
</updates>
and also template paths do not match
/mymodule/view.phtml
and
modulename/product/view.phtml
But back to your initial Question:
view.phtml of default template does not contain getChildHtml without any parameters. So the only way to inject custom stuff is to use a block of type core/text_list, which is "product.info.simple.extra". All you need is to make use of before or after attributes in your xml layout.

html content type data:image/png:Base64,

I have a link /1/, when I put it into brower address bar (remmeber to remove single quotation at the beginning and at the end). It is a image/png picture.
Now I want to show this picture by jetty comet feature by pushing to client. I have a js, part of codes is in /2/, then in the client page/browser(firefox and chrome), I could not see picture, but raw data. In web.xml, I already put mime type /3/. Could any expert drop me some hints how to show picture when sending data from server to client?
/1/Please remove single quotation at the begining and at the end of block
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAEsCAYAAAA7Ldc6AAAbO0lEQVR4nO3df6zld17X8acwkj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aMe/sx8YUxQIAAAfbyeru6nxjB/Nr47GWX+24cdvVIwkfAACwpzaancAf5PFEdaF6q50FjHnjrepD1W0L3hsAAGCFNqrX2v1E/rCNC9X9jQ0IAQCAfXK+6cPAfo1rqx16ewAAwESOQgCx2gFwSPx/DbCPfax0k2EAAAAASUVORK5CYII=';
/3/
<servlet>
<servlet-name>cometd</servlet-name>
<servlet-class>org.cometd.annotation.AnnotationCometdServlet</servlet-class>
<init-param>
<param-name>transports</param-name>
<param-value>org.cometd.websocket.server.WebSocketTransport</param-value>
</init-param>
<init-param>
<param-name>services</param-name>
<param-value>org.cometd.tutorials.StockPriceService</param-value>
</init-param>
<init-param>
<param-name>maxLazyTimeout</param-name>
<param-value>2000</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cometd</servlet-name>
<url-pattern>/cometd/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>initializer</servlet-name>
<servlet-class>org.cometd.tutorials.Initializer</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<filter>
<filter-name>cross-origin</filter-name>
<filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>cross-origin</filter-name>
<url-pattern>/cometd/*</url-pattern>
</filter-mapping>
<mime-mapping>
<extension>png</extension>
<mime-type>image/png</mime-type>
</mime-mapping>
It is a URL to an image (albeit one where the image is embedded in the URL itself). Set it as the value of a src attribute on an img element.

How do I get autocompletion for Flex Metadata?

I took a look at flex metadata and it seems to be quiet straight forward. Though I have a problem, I don't get autocompletion for the metadata.
I'll tell you what I did, maybe you find an error. I want to create my own Style metadata tag named e.g. MyStyle. I want to create my own because it's easier for me to determine at runtime if the metadata was added by me or by the flex framework (therefore I will not use the predefined Style metadata tag).
To add metadata is pretty simple, I just wrote this code to get it work:
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
width="1024" height="768">
<fx:Metadata>
[MyStyle(required="true")]
</fx:Metadata>
</s:Group>
On my WindowedApplication component I added an added to stage listener to the stage. So all elements that are added to the application will fire that Event.ADDED when they are added to the stage. In that eventHandler I scan added elements for my metadata tag.
protected function addedToStageListener(event:Event):void
{
var classInfo:XML = describeType(event.target);
for each (var x:XML in classInfo..metadata)
{
if (x.#name == "MyStyle")
trace(x);
}
}
I also added a flex-config.xml file (in the toplevel of my src folder) to add the compiler options, so that I can read my custom metadata tag on runtime. The file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<flex-config>
<compiler>
<keep-as3-metadata>
<name>MyStyle</name>
</keep-as3-metadata>
</compiler>
</flex-config>
When I run this, I get the result I expect
<metadata name="MyStyle">
<arg key="required" value="true"/>
</metadata>
So this works. My next step was to add autocompletion when adding the metadata tag to the code. To do this you should create a metadata.xml which specifies the metadata tags right?
So I did this and I ended up with this simple metadata.xml
<?xml version="1.0" encoding="UTF-8"?>
<annotations version="2.1.1">
<metadata name="MyStyle" description="Adds style.">
<context name="class" />
<attribute name="required" type="Boolean" required="true" />
</metadata>
</annotations>
To add the metadata.xml correctly to the project I followed that tutorial by Adobe, but it doesn't work. I don't get autocompletion. Do you have any suggestions?
Update: I use Flash Builder 4.6 Professional and I created a Flex Library Project.

application-context.xml problem for Spring ActionScript

content of The application-content.xml is
<?xml version="1.0" encoding="utf-8"?>
<objects xmlns="http://www.springactionscript.org/schema/objects"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springactionscript.org/schema/objects
http://www.springactionscript.org/schema/objects/spring-actionscript-objects-1.0.xsd">
<property file="strings.properties" />
<object id="string1" class="String"/>
<object id="string2" class="String"/>
<object id="nlslzf" class="com.sgb.model.MyClass"/>
</objects>
content of strings.properties is:
s1=Firststring
s2=Secondstring
but error:
Main Thread (Suspended: Error: An object definition for 'string1' was not found.)
org.springextensions.actionscript.ioc.factory.support::AbstractObjectFactory/getObject
SpringActionScript/test
SpringActionScript/onCreationComplete
SpringActionScript/___SpringActionScript_Application1_creationComplete
flash.events::EventDispatcher/dispatchEventFunction [no source]
mx.core::UIComponent/dispatchEvent
mx.core::UIComponent/set initialized
mx.managers::LayoutManager/doPhasedInstantiation
Function/http://adobe.com/AS3/2006/builtin::apply [no source]
mx.core::UIComponent/callLaterDispatcher2
mx.core::UIComponent/callLaterDispatcher2
mx.core::UIComponent/callLaterDispatcher
i can run normal if removed the ''
why it is? springactionscript bug?
This does indeed 'smell' like a Spring Actionscript bug.
Please file a bug report for this in our JIRA system:
SpringAS JIRA
If you can, add a sample project that demonstrates the bug, that way we'll be able to track down the issue easier and faster.

Windsor Method interception (AOP)

I'm trying to create interceptors for specific methods but I'm having a hard time. I can't bind an aspect to a specific method. I create the faicilities most of examples show but it still doesn't work. Can anyone give me an example of how to do this? I prefer xml conifguration, if possible.
Another question, I have this code:
<component id="SampleAspect"
service="WindsorSample.Aspect.SampleAspect, WindsorSample"
type="WindsorSample.Aspect.SampleAspect, WindsorSample">
</component>
<component id="HtmlTitleRetriever"
type="WindsorSample.DummyObject, WindsorSample">
<parameters>
<interceptors>
<interceptor>${SampleAspect}</interceptor>
</interceptors>
</parameters>
</component>
Then...
IWindsorContainer container = new WindsorContainer(new XmlInterpreter());
IDummyObject retriever = container.Resolve<DummyObject>();
retriever.SomeMethod();
This aspect is not executed. Am I missing something? Am I using the wrong approach for aop?
Thanks
You can only intercept virtual method, you know that, right?