How do I make Liferay 6.1.0 always redirect to a 404 page when a resource isn't found? - redirect

I have created a simple hook for a Liferay site I have. It contains a 404.jsp that overrides the default Liferay 404. It works fine if I type in a specific page. For example:
Going to http://localhost:8080/jooky.jsp throws
SEVERE: PWC6117: File "C%3A%5Cbundles%5Cliferay-portal-6.1.0-ce-ga1%5Cglassfish-3.1.1%5Cdomains%5Cdomain1%5Capplications%5Cliferay-portal%5Cjooky.jsp" not found
in my Glassfish server log and redirects me to my custom /errors/404.jsp without a problem.
However, going to http://localhost:8080/jooky throws a different error
INFO: 14:07:41,790 INFO [PortalImpl:4873] Current URL /jooky generates exception: null
and redirects to a page within the portal that looks like this:
Can anyone help me redirect these non-file type URL's to my 404 page as well?
Thanks.

I was still struggling to figure out how to do this until I read the section in the Liferay Developer's Guide about "Overriding a JSP".
That told me exactly what I needed to know. Where the 404.jsp file should be stored in my hook, why there was a .portal.jsp file appearing in my liferay installation, etc.
One other critical thing that was not mentioned was the addition required to the portal-ext.properties file.
I had to add the following:
# 404 page
layout.show.http.status=true
layout.friendly.url.page.not.found=/errors/404.jsp
After a server restart, the 404 page started displaying for all incorrect pages.

Related

Cannot access TYPO3 Backend after config change

I have the following problem:
After trying to change the entry point to my website in the backend of my TYPO3 system (by using the site config), I cannot access neither my backend nor my frontend of the website anymore. Whenever I try to access the site it says "Oops, an error occurred! The parsedUri "https://" appears to be malformed".
What I have tried, is accessing the config.yaml on my webserver to change the baseURL inside of the config, but no matter what I change it to, it doesn't seem to work, as I always get the same error message even uploading the changed config file (what I mean by that is, that the text inside the error message doesn't change to reflect the new url but stays "https://").
I hope that someone who is more experienced in TYPO3 can help me solve this issue. I couldn't really find a working solution after extensively searching so far. Thanks a lot in advance.
After changing the yaml file of the site configuration, you need to clear all caches, either via the install tool (yourdomain.tld/typo3/install.php) or by deleting all files in the directories var/cache/code and var/cache/data.

Customization YCommerceWebService - Webroot "/rest" not working anymore

I created a YcommerceWebServices with "ant extgen", added it in localextension file, I added the oAuth2 authentification extension.
When I was doing request from postam like :
https://localhost:9002/rest/v2/{baseSiteID}/users/{userID}/...
It was working, I was receiving all the information. Since I started to customize I get all the time HTTP Error 302 Moved temporarily .
Even when I am on the hac and I click on my customExtension in the column web on "/rest" I get a 404 (before it was working too)
I tried to "Ant clean all" and update from Hac, no result.
The problem came from the fact, that during my customization by modifying the file /web/webroot/WEB-INF/config/v2/dto-level-mappings-v2-spring.xml
I had made an error on the declaration of a bean.
Indeed looking carefully at the compilation and launch of the server (ant clean all - ./hybrisserver.sh). I saw that there was an error. the launcher was launched but my webservice was not active.

tinymce tiny browser showing 404 error on web page upload

I'm stumped at the moment- When I open my website: www.steubencony.org- I get the following console error:
GET http://steubencony.org/includes/tinymce/plugins/tinybrowser/tb_tinymce.js.php 404 (Not Found)
Now, this past monday we migrated to a new server, new IP address, and the works- this shouldn't have affected this though as much as it has. I checked multiple times figuring it has something to do with absolute path, and I've also been attempting to upgrade/update TinyMCE, but I need to get this solved before i can do any of that.
Here is the FTP path of the php file:
ftps://steube#gall.arvixe.com/steubencony.org/wwwroot/includes/tinymce/plugins/tinybrowser/tb_tinymce.js.php
What am I not seeing between the 2- I mean obviously the ftp path has the ftps, and the wwwroot folder, but I'm really thinking I'm just too close to it to see the simple error. Any help would be most appreciated.

Zend A 404 error occurred Page not found

I am new to zend frame work. I am in the process of learning this, in fact at the very beginning of this. My problem is that I download the zend studio and try to run the zend application by following a tutorial on net but the when I run the code it said that
'A 404 error occurred
Page not found The requested URL could not be matched by routing '.
I googled man time and applied all the possible solutions on it but all in vein. Kindly help me in this regard.
To Do list:
check your server folder permission -> 777 for the development
check .htaccess file in the public folder, there is a good example .htaccess files for Zend in here stackoverflow
check your php configuration for model rewrite, unlikely sometimes it does not install
check your apache site-enable file for model rewrite and allowaccess
you need to google them out, but that is it, after you finish your first one , all other project just copy from the first one

tomcat6 application deployment error

I am new to tomcat and servlets and am trying to deploy my first web application in tomcat and the index.jsp page is showing up blank.
It works fine in eclipse. I have the web.xml for the application setup to have the index.jsp as the default page. I am able to run the application and debug it in eclipse but when I export it as a WAR file and deploy it in tomcat and try to access it through a regular browser I get a blank page.
What am I missing here? Any help is greatly appreciated.
Thanks,
- Vas
If you ever get a blank page, the most important information you (and we) need are:
The request URL.
The already sent data -if any- (webbrowser > View Source).
The response headers (Firebug? Webdeveloper Toolbar?).
The server logs (stdout, stderr, webapp).
This usually indicate a wrong URL (to be proven by 1), or an exception halfway a JSP page (to be proven by 2 and 4), or an internal server error without an error page (to be proven by 3 and 4).
You need to configure your server.xml file and declare a context for your web application. You can find the documentation here: http://tomcat.apache.org/tomcat-6.0-doc/config/context.html
But a blank page is kind of weird, because I think if your web application wasn't deploy correctly, you will get a Http 404 error.