Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » CompilationUnit for JSP
CompilationUnit for JSP [message #206409] Fri, 04 January 2008 10: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 09:40 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 14:32:40 EDT 2025

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

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

Back to the top