Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » CompilationUnit for JSP
CompilationUnit for JSP [message #206409] Fri, 04 January 2008 15:13 Go to next message
Eclipse UserFriend
Originally posted by: Tanyu.Krasimirov.Trifonov.sap.com

Hi,

Is there a CompilationUnit for compiled JSP and how can I get it? How can
I add some code (scriplet) to existing JSP file?

Best regards,
Tanyu
Re: CompilationUnit for JSP [message #206424 is a reply to message #206409] Sat, 05 January 2008 14:40 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2872
Registered: July 2009
Senior Member

Tanyu Trifonov wrote:
> Is there a CompilationUnit for compiled JSP and how can I get it? How
> can I add some code (scriplet) to existing JSP file?

You'll want to examine the
org.eclipse.jst.jsp.core.internal.validation.JSPJavaValidato r.performValidation(IFile,
IReporter, IStructuredModel) method and (its caller in the same
class) to see how the IJSPTranslation object is created. The
compilation unit mapping from JSP to/from Java sources is very
internal, so your best bet is to add the scriptlet to the JSP using
either the DOM interfaces (available on the IDOMDocument) or through
the text IDocument itself.

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:HTML/jsp design with WTP
Next Topic:Custom editor embedded in an html file
Goto Forum:
  


Current Time: Mon Jun 26 10:38:23 GMT 2017

Powered by FUDForum. Page generated in 0.02963 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software