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.

Bug 69864 - JSP SYNTAX:Enable to ask JSP on java methods
Summary: JSP SYNTAX:Enable to ask JSP on java methods
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomasz Slota
URL:
Keywords:
Depends on:
Blocks: 69366
  Show dependency tree
 
Reported: 2005-12-05 09:40 UTC by Milan Kuchtiak
Modified: 2007-11-23 15:10 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kuchtiak 2005-12-05 09:40:46 UTC
Implement method that returns all java methods from JSP scriplets.
Comment 1 Marek Fukala 2005-12-05 17:36:01 UTC
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?
Comment 2 Marek Fukala 2006-08-21 13:33:07 UTC
Milane, do you still need this functionality?
Comment 3 Milan Kuchtiak 2006-08-21 15:38:54 UTC
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.
Comment 4 Tomasz Slota 2007-11-23 15:10:14 UTC
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.