How Debug jsp's having same named multiple files available in source code?

thumbnail
Sachin B. Jagtap, modified 12 Years ago. Junior Member Posts: 57 Join Date: 3/22/14 Recent Posts
Hi All,
I want to debug liferay source code in which i have get problem with view.jsp or same named multiple files available in source code.
that's why whenever i am trying to put break point in particular out-of-box portlets view.jsp then it opens another portlets view.jsp file like that,

-In my environment set : IDE - Eclipse Indigo, Liferay 6.1.1 GA2 ,Tomcat 7.0.27,(OS:Windows & Linux both),MySql.

-I am interested in How to debug JSP files with same name in source code of liferay?
Anyone knows how to debugging in jsps in liferay please guide me for that?


Thanks in Advance
Regards ,

Sachin Jagatap
thumbnail
Lu Li, modified 12 Years ago. Junior Member Posts: 40 Join Date: 5/3/13 Recent Posts
Hi Sachin,

Thanks for the report , this is known as apache tomcat server's problem , tomcat could only look for the file name instead of location. so it could messed up when you have multiple portlets in same project .

There are few ways you can avoid this problem :

1,Liferay suggests to create only one-portlet-in-one-project . Also , when you create a portlet project it actually contains a portlet already , remember not to add them both to the page, only add the one you want to debug with .
2.If you want to have multiple portlets in same project ,for debug you can modify those jsp file name "view.jsp" ."edit.jsp", "about.jsp" etc to another name to avoid the problem

let us know if you have any problem emoticon
thumbnail
Sachin B. Jagtap, modified 12 Years ago. Junior Member Posts: 57 Join Date: 3/22/14 Recent Posts
Hi Lu,
Thanks for replying,
Actually I am asking for out -of - portlets of liferay :
In that case if i am modifying the file names then i need to configure file names into configuration files also that's why i am thinking it too complicated way to debugging.
If any other way is for this then please share with us..



Once again Thanks for replying,
Regards
Sachin Jagtap
thumbnail
Lu Li, modified 12 Years ago. Junior Member Posts: 40 Join Date: 5/3/13 Recent Posts
Hi Sachin,

It is the same way to debug out-of-box portlets , could you check your project's portlet.xml and check there is more than one portlet. if so , make sure you only added that one you want to debug on your site . Also you can try to remove the other portlets in portlet.xml temporarily just for debug ,when you finish you can replace it back.Let us know you have any problem.
thumbnail
Sachin B. Jagtap, modified 12 Years ago. Junior Member Posts: 57 Join Date: 3/22/14 Recent Posts
hi Lu,
I have modified the jsp file name which i want to debug with putting debug points & placed the changed named file into below configuration file which contain more one portlets configuration portlet-custom.xml
then i am start the tomcat server in debugging mode & performed some portlet related task even though its not working for me.

Can you please elaborate with some example like Blogs,wiki portlets jsp file with configuration files?


Thanks for Replying
regards,
Sachin Jagtap
thumbnail
Lu Li, modified 12 Years ago. Junior Member Posts: 40 Join Date: 5/3/13 Recent Posts
Hi Sachin,

Sorry about that , you were right , can't modify view.jsp name . could you adit the source lookup manually to point to the right path ? just when it hits to the breakpoint , choose the right view.jsp file .

Also .I wonder if you can remove those view.jsp for other portlet first , just focus on the one you want to debug with . or maybe you can try the way i posted above , just remove other portlets' element in portlet.xml and try if it could work ?