Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

AEM 6.5 Service Pack 19 installed, javax.servlet.include.query_string missing

Avatar

Level 4

We are in the process upgrading AEM 6.5.12 to 6.5.19. After installing service pack 19, in our code, request.getAttribute("javax.servlet.include.query_string") commands return null instead of query string information. It seems that all the javax.servlet.RequestDispatcher 's javax.servlet.include.* constants are now missing from the request.

 

I have looked through the service pack release notes (13-19) and found nothing about changes to the request or to javax.servlet.

 

Does anyone have any idea how or way this would change and what kind of remedy is available, either to get it back or some kind of work around?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Community Advisor

@Matt-H- I tried to install AEM 6.5.19 on top of vanilla AEM 6.5 instance and I didn't faced any issues.. can you also try the same then install your custom/client/project code base on top of it along with ACS or any other third-party code.. so that we can trace out where the problem exists..

Avatar

Level 4

So far, from 6.5.12, I have tried earlier upgrade packs, and it looks like it stops working with the 6.5.15 upgrade.

 

I will try a plain 6.5, install 6.5.19, and then our custom code, and see how it goes.

Avatar

Level 4

In a vanilla AEM 6.5 instance, I created this file:  /apps/weretail/components/structure/page/info.html.jsp

<!DOCTYPE html><html>
<head>
<title>javax.servlet.include Test</title>
</head>
<%@include file="/libs/foundation/global.jsp"
%><%@ page import="com.day.cq.commons.*,
com.day.cq.wcm.api.WCMMode,
org.apache.sling.api.servlets.SlingAllMethodsServlet" %><body>
<pre>
<%
String query_string = (String) request.getAttribute("javax.servlet.include.query_string");
String request_uri = (String) request.getAttribute("javax.servlet.include.request_uri");
String context_path = (String) request.getAttribute("javax.servlet.include.context_path");
String servlet_path = (String) request.getAttribute("javax.servlet.include.servlet_path");
String path_info = (String) request.getAttribute("javax.servlet.include.path_info");
%>
javax.servlet.include.query_string : <%= query_string%>
javax.servlet.include.request_uri : <%= request_uri%>
javax.servlet.include.context_path : <%= context_path%>
javax.servlet.include.servlet_path : <%= servlet_path%>
javax.servlet.include.path_info : <%= path_info%>
</pre>
</body>
</html>

And then I went to http://localhost:4502/content/we-retail/us/en/men.info.html?wcmmode=disabled and I got these results:

javax.servlet.include.query_string : wcmmode=disabled
javax.servlet.include.request_uri : /content/we-retail/us/en/men.info.html
javax.servlet.include.context_path : 
javax.servlet.include.servlet_path : 
javax.servlet.include.path_info : /content/we-retail/us/en/men.info.html

That was fine up to the 6.5.14 service pack. But once I put in the 6.5.15 service pack, I get this instead:

javax.servlet.include.query_string : null
javax.servlet.include.request_uri : null
javax.servlet.include.context_path : null
javax.servlet.include.servlet_path : null
javax.servlet.include.path_info : null

I've tried looking at the code differences between 6.5.14 and 6.5.15 to see what change might be causing this. I tried putting 6.5.15's /libs into a 6.5.14 installation and the javax.servlet.include still worked, so  I've determined that it's not any changes in /libs, it must be somewhere else in the installation.

 

I don't know how to trace this down any further. Any suggestions?

Avatar

Administrator

@Matt-H- Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni