facebook

Include servlet java files generated in Jrun 4

  1. MyEclipse IDE
  2.  > 
  3. Feature Requests
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #206416 Reply

    kvance
    Member

    JRun 4 has a setting to generate Java files of servlet classes after it compiles JSP pages. This makes debug more easy as the errors shown in MyEclipse console window could be as follows:

    04/24 22:33:39 error
    java.lang.ClassCastException
    at jrun__pages__index_022ejsp13._jspService(jrun__pages__index_022ejsp13.java:159)

    Actually MyEclipse creates a link for this error (under the file name) but when I clicks on the link, the console shows that the file could not be found. Of course, I could view the java file generated by Jrun(jrun__pages__index_022ejsp13.java) in Jrun logs folder.

    My question is:
    Is there any way I could add a folder in MyEclipse that is similar to the folder in jrunroot/servers/myapp/WEB-INF/jsp and has all java files generated by Jrun, so that I could view those java files within MyEclipse during debugging instead of viewing them from Jrun logs folder?

    Thanks in advance.

    Kathy 😉

    #206431 Reply

    Riyad Kalla
    Member

    Kathy,
    Scott was kind enough to reply to this with the following message:

    It will probably cause a problem because once the source folder is added,
    Eclipse will try to compile the files and MyEclipse will try to deploy them
    automatically, thus giving you multiple copies of the same thing. Not good.

    However, what might work would be to create a seperate project and link the
    source folder to the JRun 4 source folder externally. The new project could
    be just a normal java project and this would remove the deployment issue.
    The way we launch the servers, the source lookup considers all open projects
    as possibilities, not just the web project so ‘in theory’ the files should
    be found. Of course, this assumes that JRun 4 compiles them into properly
    packaged directories, based on classname. Tomcat, for example, does not.

    Final caveat: I’ve never done this, but I see that it *might* work.

    So it seems we are in a “never tried it, go for it, but do it this way…” type of situation. Let us know if this works.

    #206486 Reply

    kvance
    Member

    Scott and Riyad,
    Thanks for your response. I agree that it would be a problem during depolying if a new source folder is added.

    According to your suggestion, I did:
    1) create a new Java project called error-info
    2) set project content directory to Jrunroot/servers/myapp/WEB-INF/jsp which is the folder stored JRun serlvet java files.
    3) start myapp Jrun server within Eclipse

    It works. In order to view new Jrun Java files, I need to refresh the error-info project. It is still better than the way I did before. Before I had to leave Eclipse window and search for those Jrun java files under Jrun 4 folder.
    At least, it might be a way to view some source folders which are not related to a current prject within Eclipse. But I need to create one project per source folder within Eclise.

    It did not work if I tried to add a folder under a Java project and linked the folder to Jrunroot/servers/myapp/WEB-INF/jsp.

    Is there any way I could turn off those compiling warnings in this new project if I do not add any jar files in its classpath? This project created is only used to view the java files. I saw lots of red marks on those Jrun java files, which is kind of annoying.

    Thanks a lot for your help.

    Kathy

    #206490 Reply

    Riyad Kalla
    Member

    Is there any way I could turn off those compiling warnings

    If they are really warnings and not errors, you can adjust them via the Project > Properties > Java Compiler settings. If they are errors, then you will need to add the missing libs to the Java Build Path for that project.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Include servlet java files generated in Jrun 4

You must be logged in to post in the forum log in