Book a Demo

Author Topic: Generating JSP files  (Read 3482 times)

alexeinov

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Generating JSP files
« on: August 22, 2006, 05:12:39 am »
Hi!

We are trying to generate appropriate code for JSP pages in our Web-application model, but there does not seem to be any plausible way to do that. JSP pages are modelled as Java classes with a stereotype <<jsp page>>. When code is generated from the model, we get Java files, not JSP files.

Is there any way to model and generate JSP files correctly? Can somebody help me with this? Thanks!

thomaskilian

  • Guest
Re: Generating JSP files
« Reply #1 on: August 22, 2006, 10:18:16 am »
EA does not take care of this stereotype. You would need to modify the code gen templates. Remember that roundtripping is limited in that case.

alexeinov

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Generating JSP files
« Reply #2 on: August 23, 2006, 04:10:47 am »
Thank you for reply.

So I can define my own stereotype overrides. Can I change EA generate files .jsp instead of .java for the <<jsp page>> stereotype?

Is it a good idea to define a new language JSP and create custom templates for it?

Anyway, I don't see other file extension settings then for the fixed collection of supported languages. Is there a way to configure custom file type associations for own stereotypes and languages?
Thank you very much!

thomaskilian

  • Guest
Re: Generating JSP files
« Reply #3 on: August 23, 2006, 06:29:47 am »
Don't nail me to this, since for the last months I've been more on the analysis side and not for coding: for own languages you need to write the extension by hand. When you gen code (Ctrl+G) you will be asked the first time when there is no file path stored for a class. I normally enable "Replace source" in the code gen options.