Forums de discussion

How to override main_search.jspf of portal-search-web portlet in liferay CE

thumbnail
Abhishek Jain, modifié il y a 6 années.

How to override main_search.jspf of portal-search-web portlet in liferay CE

Regular Member Publications: 226 Date d'inscription: 20/08/16 Publications récentes
I am trying to override jsp of portal-search-web portlet named main_search.jspf in liferay 7 CE. I have just added a line in the existing code- System.out.println("Hello"); to the existing code. But it is giving error-org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP__PWC6199: Generated servlet error:_unknown enum constant org.osgi.service.component.annotations.ReferenceCardinality.MULTIPLE_ reason: class file for org.osgi.service.component.annotations.ReferenceCardinality not found__PWC6199: Generated servlet error:_unknown enum constant org.osgi.service.component.annotations.ReferencePolicy.DYNAMIC_ reason: class file for org.osgi.service.component.annotations.ReferencePolicy not found__PWC6199: Generated servlet error:_unknown enum constant org.osgi.service.component.annotations.ReferencePolicyOption.GREEDY_ reason: class file for org.osgi.service.component.annotations.ReferencePolicyOption not found__PWC6197: An error occurred at line: 17 in the jsp file: /main_search_result_form.jspf_PWC6199: Generated servlet error:_cannot find symbol_ symbol: method checkViewURL(java.lang.String,java.lang.String)_ location: variable searchDisplayContext of type com.liferay.portal.search.web.internal.display.context.SearchDisplayContext__PWC6199: Generated servlet error:_search_jsp.java uses or overrides a deprecated API.__PWC6199: Generated servlet error:_Recompile with -Xlint:deprecation for details.__PWC6199: Generated servlet error:_search_jsp.java uses unchecked or unsafe operations.__PWC6199: Generated servlet error:_Recompile with -Xlint:unchecked for details.__ [Sanitized] Please help me to resolve this issue. Thanks in advance.
thumbnail
Andrew Jardine, modifié il y a 6 années.

RE: How to override main_search.jspf of portal-search-web portlet in lifera

Liferay Legend Publications: 2416 Date d'inscription: 22/12/10 Publications récentes
Hi Abhishek,

If you are still having this issue, we're going to need a little more to be able to help you out. I am assuming that you have create a JSP fragment project for this requirement? If so, and you are still having the issue, can you share the bnd file, gradle file, and your version of the jsp with us please.