Skip to content

try to unify POST processing in servlets#2402

Merged
merks merged 1 commit intoeclipse-birt:masterfrom
ischindl:fix_post_in_engineservlet
Mar 30, 2026
Merged

try to unify POST processing in servlets#2402
merks merged 1 commit intoeclipse-birt:masterfrom
ischindl:fix_post_in_engineservlet

Conversation

@ischindl
Copy link
Copy Markdown
Contributor

#2393 fixing missing POST processing in EngineServlet by moving common parts into BaseReportEngineServlet

Copy link
Copy Markdown
Contributor

@merks merks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly just a few small changes to suggest, but the exception handling looks like it will be easily to miss problem unless one watches the console.

Comment on lines +202 to +203
Iterator it = request.getParameterMap().keySet().iterator();
while (it.hasNext()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use an for-each loop directly on the keySet?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s maybe my iPhone, but I don’t see the change. It’s been force pushed? I’ll check on my computer, but that will be much later or tomorrow.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My fault Ed, now it is force pushed.

* @param response
*/
public void soapService(HttpServletRequest request, HttpServletResponse response) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of pointless whites pace.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

GetUpdatedObjectsResponse responseObj = binding.getUpdatedObjects(requestObj);
BirtSoapMarshaller.marshalResponse(responseObj, response);
} catch (BirtSoapException e) {
// TODO Auto-generated catch block
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are quite a few printStackTraces that should be logged in some more visible way.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

* @param context
*/
public void __doPost(IContext context) throws BirtException {
// TODO Auto-generated method stub
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this complete?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes its complete and added comment here


}

private static String escape(String s) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surely a utility must exist that does this...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exists but not between BIRT dependencies - one function here is simpler than add next dependency

StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
current.printStackTrace(pw);
pw.flush();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's not necessary to close these, but one might use a try-with anyway.

Copy link
Copy Markdown
Contributor Author

@ischindl ischindl Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added close to PrintWriter

@ischindl ischindl requested a review from merks March 30, 2026 16:14
@ischindl ischindl force-pushed the fix_post_in_engineservlet branch from 32a9bc9 to 86a0fd9 Compare March 30, 2026 17:25
@ischindl ischindl force-pushed the fix_post_in_engineservlet branch from 86a0fd9 to d720f08 Compare March 30, 2026 17:36
@merks merks merged commit 25b3113 into eclipse-birt:master Mar 30, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants