WebApp Response Message
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 61
- Joined: Tue Oct 27, 2015 11:49 am
WebApp Response Message
Post by Konstantin »
Hello !!!
I use WebApp 18.0.0
I made Save for documents (I use servlet for saving on custom datesource site) and now I need handle different error messages.
When I spend:
I get message:
Error saving document: 404 Not Found for: http://localhost:8888/webapp_editor?sou ... tId=111111
How can I show my messages in webapp ?
I use WebApp 18.0.0
I made Save for documents (I use servlet for saving on custom datesource site) and now I need handle different error messages.
When I spend:
Code: Select all
protected void doPut(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {
resp.sendError(404, "Error message");
}
Error saving document: 404 Not Found for: http://localhost:8888/webapp_editor?sou ... tId=111111
How can I show my messages in webapp ?
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: WebApp Response Message
Post by cristi_talau »
Hello,
To be sure I understand your context: you are using oXygen XML Web Author 18.0.0 (as part of the SDK) and using the "http" or "webdav" protocol to load and save document. Right?
In Web Author we currently ignore the server response on HTTP requests since sometimes it contains an entire HTML page that is not suitable to display in an error message. I registered an improvement request to display the server response if it is plain-text or just contain inline markup link <a> or <b>.
If that turns out to be a showstopper for you, we can try to find a workaround until the fix is released.
Best,
Cristian
To be sure I understand your context: you are using oXygen XML Web Author 18.0.0 (as part of the SDK) and using the "http" or "webdav" protocol to load and save document. Right?
In Web Author we currently ignore the server response on HTTP requests since sometimes it contains an entire HTML page that is not suitable to display in an error message. I registered an improvement request to display the server response if it is plain-text or just contain inline markup link <a> or <b>.
If that turns out to be a showstopper for you, we can try to find a workaround until the fix is released.
Best,
Cristian
-
- Posts: 61
- Joined: Tue Oct 27, 2015 11:49 am
Re: WebApp Response Message
Post by Konstantin »
You right, we use http protocol.To be sure I understand your context: you are using oXygen XML Web Author 18.0.0 (as part of the SDK) and using the "http" or "webdav" protocol to load and save document. Right?
We need use custom messages in response.
Could you help ?
-
- Posts: 517
- Joined: Thu Sep 04, 2014 4:22 pm
Re: WebApp Response Message
Post by cristi_talau »
We are going to make this change in the next version of oXygen XML Web Author.
If you want this functionality in 18.0 you will need to patch our WebDAV plugin available on GitHub [1] and install it in Web Author [2]. You will have to use webdav-http instead of http when passing the URL to the Web Author.
Basically you should insert a code snippet like below in the WebdavUrlConnection class [3].
Best,
Cristian
[1] https://github.com/oxygenxml/webapp-webdav-integration
[2] https://www.oxygenxml.com/doc/versions/ ... ugins.html
[3] https://github.com/oxygenxml/webapp-web ... .java#L101
If you want this functionality in 18.0 you will need to patch our WebDAV plugin available on GitHub [1] and install it in Web Author [2]. You will have to use webdav-http instead of http when passing the URL to the Web Author.
Basically you should insert a code snippet like below in the WebdavUrlConnection class [3].
Code: Select all
if (this.delegateConnection instanceof HttpURLConnection) {
InputStream is = ((HttpURLConnection)this.delegateConnection).getErrorStream();
String message = null;
try {
message = IOUtils.toString(is, "UTF-8");
} catch (IOException e) {
} finally {
IOUtils.closeQuietly(is);
}
if (message != null) {
throw new IOException(message, e);
}
}
Cristian
[1] https://github.com/oxygenxml/webapp-webdav-integration
[2] https://www.oxygenxml.com/doc/versions/ ... ugins.html
[3] https://github.com/oxygenxml/webapp-web ... .java#L101
-
- Posts: 61
- Joined: Tue Oct 27, 2015 11:49 am
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service