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


Current Time: Mon Sep 26 21:10:53 GMT 2016

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

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