http-status-code-404

Spring 3 — form with 2 buttons, sending 2 parameters to controller method

孤街浪徒 提交于 2019-12-04 03:08:46
I have a Spring 3 MVC form with 2 parameters I'm trying to send to my controller method, and I'm getting a 404 error. The twist on this problem is that the form has 2 submit buttons, and the submit button that is clicked dictates the value of one of the parameters. Here is my form. <form:form action="/approve/${bulletin.id}" method="post"> <table> <tr> <td colspan="2"><b>From:</b> <c:out value="${bulletin.name}" /></td> </tr> <tr> <td colspan="2"><b>Subject:</b> <c:out value="${bulletin.subject}" /></td> </tr> <tr> <td colspan="2"><b>Date:</b> <c:out value="${bulletin.date}" /> <br></td> </tr>

Google 404 and .NET Custom Error Pages

佐手、 提交于 2019-12-04 03:03:44
I've got an ASP.NET 2.0 website with a custom 404 page. When content is not found the site serves the custom 404 page with a query string addition of aspxerrorpath=/mauro.aspx. The 404 page itself is served with an HTTP status of 200. To try to resolve this I've added protected void Page_Load(object sender, EventArgs e) { Response.StatusCode = 404; } I added the Google widget and have two issues with it. In Internet Explorer 7 it does not display where it should. If I add it to the content, I get an "unknown error" on char 79 line 226 or thereabouts; if I add it to the head section the search

WCF Exists and partially working but for some calls returns “no endpoint listening - (404) Not Found.”

ε祈祈猫儿з 提交于 2019-12-04 02:22:25
We have service that's working with small to large sets of data (document generation), and it's working fine for some calls, but for some specific requests (exact same method, different arguments) it just returns: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://localhost:8010/MyService/MyService.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: The remote server returned an error: (404) Not Found. Note that the service is working

How to specify a custom 404 view for Django using Class Based Views?

好久不见. 提交于 2019-12-04 02:15:28
Using Django, you can override the default 404 page by doing this in the root urls.py : handler404 = 'path.to.views.custom404' How to do this when using Class based views? I can't figure it out and the documentation doesn't seem to say anything. I've tried: handler404 = 'path.to.view.Custom404.as_view' Never mind, I forgot to try this: from path.to.view import Custom404 handler404 = Custom404.as_view() Seems so simple now, it probably doesn't merit a question on StackOverflow. Andrei Fecioru Managed to make it work by having the following code in my custom 404 CBV (found it on other

YII how to handle custom 404 error page along with other error pages

馋奶兔 提交于 2019-12-04 01:24:07
I want to display 404 error page for that i have made error404.php file in my protected/view/system folder. By default i have Sitecontroller and it contained error action function as below public function actionError() { if($error=Yii::app()->errorHandler->error) { if(Yii::app()->request->isAjaxRequest) echo $error['message']; else $this->render('error', $error); } } inside main config file it is defined as 'errorHandler'=>array( // use 'site/error' action to display errors 'errorAction'=>'site/error', ), my problem is i need to customize 404 page only, rest of the error i need to handle the

How to display Apache's default 404 page in PHP

余生长醉 提交于 2019-12-03 23:31:30
I have a webapp that needs to process the URI to find if a page exists in a database. I have no problem directing the URI to the app with .htaccess: Options +FollowSymlinks RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^(.*)$ index.php?p=$1 [NC] My problem is that if the page does not exist, I do not want to use a custom 404 handler written in PHP, I would like do show the default Apache 404 page. Is there any way to get PHP to hand execution back to Apache when it has determined that the page does not exist? The only possible way I am aware of for the above scenario is to

ASP.NET MVC - Elmah not working and returning 404 page for elmah.axd

▼魔方 西西 提交于 2019-12-03 18:09:51
问题 I'm trying to use elmah for my MVC application and I've followed the steps on the wiki: http://code.google.com/p/elmah/wiki/MVC , but even so when trying to access myapp/elmah.axd the page: 404 - File or directory not found. Anyone could help me please? OBS: My IIS Version is 7.5 If helps I'm posting the pertinent sections of my web.config: <sectionGroup name="elmah"> <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" /> <section name="errorLog"

Django Test Client post() returns 302 despite error on view's post()

二次信任 提交于 2019-12-03 16:17:12
问题 I'm currently writing up some basic tests to ensure pages in a medium sized Django application are GETting and POSTing correctly. However, using django.test.client.Client isn't reliably failing when it should be. It returns a 302 response even when there's obviously placed errors in my code. in my app/urls.py: url(r'^mymodel/create/$', views.MyModelView.as_view(), name = 'my_model_create'), Then, in attempts to intentionally create a 500 response, I did the following: class MyModelCreateView

How to deny with 404 on nginx

你。 提交于 2019-12-03 13:31:01
I want to secure some locations in nginx by supplying deny/allow directives, but I do not want outsider to know that a location is denied. I want outsider to get 404, not 403 http code. My configuration snippet is location /admin/ { uwsgi_pass myupstream1; include /path/to/uwsgi_params; allow 127.0.0.1; deny all; } When I try to visit /admin/ nginx responds with HTTP 403, but I want it respond with HTTP 404. Any recipe for this? ARGB32 error_page 403 404 /404.html; location = /404.html { internal; #return 404 } location /admin/ { uwsgi_pass myupstream1; include /path/to/uwsgi_params; allow 127

Scrapy:In a request fails (eg 404,500), how to ask for another alternative request?

﹥>﹥吖頭↗ 提交于 2019-12-03 13:25:59
I have a problem with scrapy. In a request fails (eg 404,500), how to ask for another alternative request? Such as two links can obtain price info, the one failed, request another automatically. Use "errback" in the Request like errback=self.error_handler where error_handler is a function (just like callback function) in this function check the error code and make the alternative Request. see errback in the scrapy documentation: http://doc.scrapy.org/en/latest/topics/request-response.html alecxe Just set handle_httpstatus_list = [404, 500] and check for the status code in parse method. Here's