Skip to main content


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: 4435
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:How Can I get the specified source code?
Next Topic:Dynamic Web Project nature disappears
Goto Forum:
  


Current Time: Thu Apr 25 14:33:43 GMT 2024

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

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

Back to the top