I have JSP page that has a form which submits to a servlet. However it doesn't work on mobile/tablet but works on browser.
On mobile/tablet I'm getting an internal server error.
JPS Code:
<form id='searchForm' action='/bin/pubnetSEARCH' method='GET'> <div class="searchContainer"> SEARCH: <input id='searchItem' type='text' name='searchItem'> </div> <input type="submit" style="display:none"/> </form>
Servlet path:
/bin/pubnetSEARCH
Views
Replies
Total Likes
Some Trouble shooting:-
1.Try including Mobile JQuery as well.
Link:- https://jquerymobile.com/download/
2. Add data-ajex="false"
Link:- http://www.gajotres.net/how-to-correctly-submit-form-data-in-jquery-mobile/ (This will prevent jQuery Mobile from using page transitions so be careful).
I hope this might help you.
~kautuk
Views
Replies
Total Likes
Hi,
//Adding with kautuk, Also look into this article which resolves your use case: https://helpx.adobe.com/experience-manager/using/submitting-mobile-form-data-cq.html
Please let us know, if it works in your mobile/tablet.
Thanks,
Ratna Kumar.
Views
Replies
Total Likes
I tried both suggestions and none of them work.
Also the adobe article uses an ajax call, however I'm not using that in my scenario as I'm trying to redirect to different page.
From my understanding ajax responses only can be displayed on the same page it was submitted from.
Views
Replies
Total Likes
Your issue is a mobile app does not redirect to a different page when you are trying to use a servlet to redirect?
You are correct in that the HELPX use case is posting data from a JQuery Mobile API to an AEM Servlet - which is different from what you are trying to do.
Views
Replies
Total Likes
smacdonald2008 wrote...
Your issue is a mobile app does not redirect to a different page when you are trying to use a servlet to redirect?
You are correct in that the HELPX use case is posting data from a JQuery Mobile API to an AEM Servlet - which is different from what you are trying to do.
Yes exactly this Scott!
Views
Replies
Total Likes
If you try and render basic HTML from the the servlet - does that work in mobile - i am trying to determine if its an issue with content or complexity of content.
Views
Replies
Total Likes
ANother issue i am thinknig is the servlet may not be programmed to render mobile friendly pages. Take a look at the content that is returned via the servlet.
Views
Replies
Total Likes
smacdonald2008 wrote...
ANother issue i am thinknig is the servlet may not be programmed to render mobile friendly pages. Take a look at the content that is returned via the servlet.
Actually I'm just getting a query from the servlet and passing that to a request attribute which the JSP will parse through and build the HTML.
Servlet is doing no rendering of any html at all. The weird part is, there are 3 other pages that work the same way, it's just this one page which uses a form.
If I use an ajax call, it will work. However that's not my use case here.
Views
Replies
Total Likes
This may be a Bug. Open a ticket to let the support team and Eng team know about the issue. We have no community content for this that I can point you to that will help this. Something sounds broken.
Views
Replies
Total Likes
It seems like bug to me too.
Please create a ticket with support team. And also do mention fix, when provided to you, here.
~kautuk
Views
Replies
Total Likes
Views
Likes
Replies