How to stop Eclipse IDE from trying to download DTDs for validation? - eclipse

I have a XHTML-file using the following doctype-definition:
`<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">`
Eclipse is trying to validate the file by using the referenced dtd file, which results in this error:
ParseException: Error validating the model: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
The reason is an intended error response, like described here:
W3C's Excessive DTD Traffic
So I tried to stop Eclipse from trying to download the file by disabling HTML validation, but this didn't help.
How can I get rid of the error message and stop Eclipse from trying to download the DTD-file?
edit: Eclipse-version is Galileo 3.5

Which Eclipse version do you use? In 3.5 (Galileo), as default, the DTD for HTML/XHTML will be stored as local file and you won't get such problem.
You can also deactivate the XML validation, but not only the DTD check will be deactivated, but all XML validation.
EDIT: check the Preferences -> XML -> XML Catalog and check if the file has already referenced to local file. If not, you can add it yourself

Related

How to avoid error messages in Eclipse 2020-03 for GWT ui.xml files (Language Server)

In my GWT 2.8 based project Eclipse 2020-03 shows me lots of error message under Markers -> Language Servers
I am sure that these are not errors. For some reason, Eclipse cannot interpret ui.xml files correctly. The application compiles and runs fine:
My eclipse wide settings for XML validation are as follows:
There are not project-specific settings for this
Here is an extract (not the complete source!!!) of one example of a something.ui.xml file. The project contains lots of those files:
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder
xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:b="urn:import:org.gwtbootstrap3.client.ui"
xmlns:a="urn:import:com.myapp.client.widgets"
ui:generateFormat="com.google.gwt.i18n.rebind.format.PropertiesFormat"
ui:generateKeys="com.google.gwt.i18n.server.keygen.MD5KeyGenerator"
ui:generateLocales="default" >
<ui:with type="com.myapp.resources.text.CommonMessages" field="msgs" />
<ui:with type="com.myapp.resources.text.SummaryMessages" field="sMsgs" />
<b:Modal closable="true" fade="true" dataBackdrop="STATIC" dataKeyboard="true"
b:id="dialog"
ui:field="dialog">
<b:ModalHeader title="{sMsgs.transferOwnership}" />
<b:ModalBody>
<g:HTML><ui:text from="{sMsgs.transferOwnershipDescription}"/></g:HTML>
<b:ListBox
ui:field="userListBox"
multipleSelect="false"
width="100%"
/>
<b:Alert type="DANGER" ui:field="participantWarning">
<b:Icon type="WARNING"/>
<g:HTML><ui:text from="{sMsgs.transferOwnershipNotParticipantWarning}" /></g:HTML>
</b:Alert>
</b:ModalBody>
<b:ModalFooter>
These are the error messages:
Mouseover on the error always shows:
although it is declared above:
[...]
xmlns:b="urn:import:org.gwtbootstrap3.client.ui"
[...]
Import: The application compiles and runs fine. So I just want to suppress those error messages (show in error) as they are not really error messages. :-)
These resources might be helpful:
Why are there multiple Angular language server tabs in my Eclipse console
You can disable this validation by unchecking the box at Eclipse -> Preferences -> Language Servers -> XML.
I had the same problem (Eclipse 2020-06).
Disabling XML Language Server for XML content type worked for me:
By "must be declared", it means declared in a Document Type Definition (DTD) or XML Schema, also known as "grammar".
The line you quoted:
xmlns:b="urn:import:org.gwtbootstrap3.client.ui"
It says there's a namespace "b", but this line has no other meaning. It doesn't, for instance, declare which elements (like Alert) are valid in that namespace.
If you are not worried about validating your XML, and only wish to turn off the error messages, I would suggest you change your options:
No grammar specified: Warning → Ignore
This will stop Eclipse trying to validate the XML against a grammar, but should still show errors for malformed XML (tags closed twice etc.). You can configure this option on a per-project basis, if you prefer.
The alternative would be to provide a DTD or Schema and reference it in the XML. You will probably have to write such a grammar yourself unless gwtbootstrap3 provides one (which I don't think it does).
To clear existing validation errors, you may have to manually delete them.

Openfire xml debugger plugin

I'm using openfire v4.1.1 and xmldebugger plugin v1.6.0 for my server side. The plugin will print raw XML as it was received and sent by the server as well as interpreted XML (i.e. parsed XML). By default the plugin will only print raw XML.
My problem is, the XML debugger plugin prints only raw XML traffic to stdout even thought the debugger plugin is configured with plugin.debugger.interpretedAllowed - true to print XML packets after they were parsed by the server. Don't know what I've missed. Added screen shot for reference.
XML debugger plugin prints only raw XML traffic to stdout.
This issue has been fixed In latest debugger plugin v1.7.0. The source code for the plugin can be obtained from git Openfire master branch. Check the source for code changes. The following are the fixes they made.
Debugger plugin will not print encrypted or compressed data.
Debugger plugin will display remote address.
Don't try the plugin source from any latest openfire source because the xml debugger plugin source has not be updated to latest v1.7.0.

wso2is custom authenticationendpoint, redirect page not used

I am developing saml sso using wso2is. I customized the authentication endpoint according the blog post below 1. Basically I just deployed a war on my server and configured application-authenticators.xml to use it:
<Authenticators>
<Authenticator name="BasicAuthenticator" disabled="false" factor="1">
<!-- <Status value="10" loginPage="/authenticationendpoint/login.do" /> -->
<Status value="10" loginPage="https://servlet.example.com/customlogin/login.do" />
</Authenticator>
</Authenticators>
login is working fine, my custom login-page sends a form to "https://servlet.example.com/idp/commonauth" which redirects me to my sp. but I also want to customize the redirect-page after the login. in the custom endpoint there is a file named 'samlsso_redirect.jsp' which looks like it should do the work but its contents are ignored.
strangely 'samlsso_redirect.jsp' the the bundled authentication endpoint is also ignored.
I have also downloaded the sources of wso2is and found org.wso2.carbon.identity.sso.saml.servlet.SAMLSSOProviderServlet hard codes the redirect message in the sendResponse() method.
Does somebody know how it is working and what I am missing here? How can I customize the redirect message?
http://dulanja.blogspot.sk/2014/01/wso2-is-samlsso-customizing-login-page.html
If you are using WSO2IS 5.0.0 version or higher version, You can simplify edit html file which can be found at IS_HOME\repository\resources\security\sso_redirect.html
Following applies to WSO2IS 4.6.0 and older versions
It seems to be that redirect page is can not be customized by using some extension. Please see this jira
However You can do as following if you want to customize it in 4.6.0...
svn checkout https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/identity/org.wso2.carbon.identity.sso.saml/4.2.2
In src/main/java/org/wso2/carbon/identity/sso/saml/servlet/SAMLSSOProviderServlet.java you have to modify the HTML getting printed in sendResponse() method.
Build the component using maven and place as a patch in wso2is-4.6.0/repository/components/patches. Copy jar file into any patch directory
Restart the server
note : The built jar name appears as: org.wso2.carbon.identity.sso.saml-4.2.2.jar. Make sure to rename it to org.wso2.carbon.identity.sso.saml_4.2.2.jar (notice that the dash is replaced by an underscore) before placing in the patch folder.
If you are using IS 5.0 then you need to modify this page:
IS_HOME\repository\resources\security\sso_redirect.html

asp.Net 2005 "Could not load type"

Although I have seen dozens of forum questions relating to "Could not load type", none of the advice in them seemed to apply to my situation.
I wrote a new web application using aspx.net VB 2005. It is tiny, with just 2 pages, 1 of which has no code-behind. It runs aok in the IDE but when I installed it on my pc (and also when installed on the production server), and tried to run it this error came up:
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'EMTTrainingDatabase.pageMain'.
Source Error:
Line 1: <%# Page Language="vb" AutoEventWireup="false" CodeBehind="pageMain.aspx.vb" Inherits="EMTTrainingDatabase.pageMain" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Source File: /EMTTrainingDatabase/pageMain.aspx Line: 1
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
I checked the web site properties in IIS and the correct ASP.net version is specified: 2.0.50727.
I checked the virtual path and it looks correct too: /EMTTrainingDatabase
pageMain source code header looks like:
<%# Page Language="vb" AutoEventWireup="false" CodeBehind="pageMain.aspx.vb" Inherits="EMTTrainingDatabase.pageMain" %>
Some posters suggest that the bin is in the wrong folder or the bin doesn't contain the rigt contents. I don't have enough knowledge to evaulate this.
Can someone help?
Thank you.
I was able to find the answer to my problem:
When I added content to the deployment project, the dll was not in the bin. When I dragged it into the bin, the program worked.
For the benefit of others who might have had the same error, it can also come due to the ASP.NET runtime being unable to locate the /bin folder.
For this, make sure you have marked the virtual directory containing your application as a web application root.
e.g. In godaddy web hosting you should mark Set Application Root to the folder/sub-folder containing your application. (Making it a virtual directory is not enough).
Hope it will help someone.
Just replace the CodeBehind attribute with CodeFile

Glassfish encoding

I'm using the code in this example example and in the runUpdate() function which i put in a javabean in a web application in Netbeans 6.8 with Glassfish v3.
It seems i have an encoding problem because question marks appear in the table.
I have tried so far:
In nbproject->private->private.properties add runtime.encoding=UTF-8>
In project->properties->sources->encoding utf-8
In program files->netbeans->etc->netbeans_conf in netbeans_default_options i add -J-DFile.encoding=UTF-8
In project->properties->build->compiling->additional compiler options -encoding utf-8
In sun-web.xml i added <locale-charset-info default-locale="UTF-8">
<locale-charset-map locale="" charset=""/>
<parameter-encoding default-charset="UTF-8"/>
</locale-charset-info>
Also when i use system.out.print() in the glassfish output panel i get gibberish.
I'm in the last level of madness please take a look.
Thank you.
EDIT
Also when i do listing .5 i get a glassfish error:
WARNING: WEB0500: default-locale attribute of locale-charset-info element is being ignored
Have you tried using glassfish-web.xml instead of sun-web.xml ?
To change default Glassfish POST fields encoding, I put this to WEB-INF/glassfish-web.xml, and it worked (I use glassfish 3.1.2):
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD
GlassFish Application Server 3.1 Servlet 3.0//EN"
"http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
<parameter-encoding default-charset="UTF-8" />
</glassfish-web-app>
I'm not sure if it will help you, but may help other people having the same problem as me.
Glassfish uses ISO-8859-1 encoding by default. See http://download.oracle.com/docs/cd/E19798-01/821-1752/beafu/index.html for more information.
Are you sure your browser is set to UTF-8. By default most browsers do not display in UTF.
Start with the browser and work backwards. Is your datasource storing the data in UTF-8? By default Java is in UTF-8 so I am not sure that GF is your real issue.