This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Implement method that returns all java methods from JSP scriplets.
What exactly do you mean by "returning java methods". Their names, positions in text, bodies, JMI representations or sg. else? What I can do is to return simple array of "method infos" which would contain method name, signatures and information about the position in the document. Is that enought?
Milane, do you still need this functionality?
We generate some java code in JSP, that calls the web service, e.g.: <% try { cur.CurrencyConvertor service = new cur.CurrencyConvertor(); cur.CurrencyConvertorSoap port = service.getCurrencyConvertorSoap(); // TODO initialize WS operation arguments here cur.Currency fromCurrency = null; cur.Currency toCurrency = null; // TODO process result here double result = port.conversionRate(fromCurrency, toCurrency); out.println("Result = "+result); } catch (Exception ex) { // TODO handle custom exceptions here } %> Currently there is still a risk of name conflict(e.g. service, port, ...) We'd need at least the list of local fields specified in JSP file.
If you are friend with web/jspsyntax you can create an instance of a SimplifiedJSPServlet and get the body of the servlet class as a string. Then you can create a JavaSource for it and query for existing class members. Check the usages of the SimplifiedJSPServlet.getVirtualClassBody() method for examples.