facebook

JSP compilation problems with .inc files

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #214114 Reply

    shankara98
    Member

    I have an include file (.inc) which all the other JSPs in my project uses. The .inc file has several common taglib and import declarations. Everything worked fine in 3.7.

    When I’m tried migrating to 3.8.1, it’s complaining that some of the custom taglib and import declarations cannot be resolved.

    Also, there was an option to recompile all JSPs, but I don’t see this in 3.8.1

    Am I missing something here??

    #214118 Reply

    magnum3065
    Member

    Well, instead of an option for recompiling JSPs, when you right click on the project you should see and option under My Eclipse called Run Validation. This runs all the enabled validations, including JSP compiling.

    #214135 Reply

    Riyad Kalla
    Member

    shankara,
    As magnum pointed out “compilation” is now known as “validation”, so effectively the same thing.

    Also as far as the includes go, what is the Build ID of Eclipse you are using (Help > About) and MyEclipse (Window > Prefs > MyEclipse)? We had some import resolution issues that were cleared up with quick fixes.

    Also can you provide a small sample that I can duplicate locally?

    #214151 Reply

    shankara98
    Member

    Version: 3.8.1+QF20040825
    Build ID: 200408201200-3.8.1+QF20040825

    I tried to come up with a small test case but was unsuccessful. My .inc file has several custom taglib references and import declarations of application specific classes.

    Also, JSP compiling seems to be excessively long. I have about 300 JSPs in the project. After sometime MyEclipse (actually Eclipse) hangs up on me.

    #214153 Reply

    Riyad Kalla
    Member

    I tried to come up with a small test case but was unsuccessful.

    So it was working for small cases, but in your project it wasn’t working?

    has several custom taglib references and import declarations of application specific classes.

    Can you try and copy just your custom taglibs to the new project and see if thats the problem? Its possible the URIs or locations of the classes/TLDs could be wrong or ME could just be not finding them correctly.

    Also, JSP compiling seems to be excessively long.

    We are no longer using our custom compiler but Jasper2 (Tomcat) compiler and it does take more time but is JSP 2.0 compliant.

    We are doing profiling now for the 3.8.2 release to help speed things up.

    #216112 Reply

    shankara98
    Member

    I downloaded the newly released 3.8.2 and am still having problems with importing through .inc files.

    Also, was the JSP compiler speeded up in 3.8.2? It’s still a lot of time and memory (sometimes more than 400MB) before crashing.

    #216114 Reply

    Scott Anderson
    Participant

    Include files are not full JSP’s so they should not be validated. You can specify that you’re using .inc, instead of the standard .jspf, for include files at Window > Preferences > MyEclipse > Editors > JSP in the “JSP Fragment Extensions” box. Once you’ve registered .inc properly, you should be able to rebuild and clear up the problems.

    #216131 Reply

    shankara98
    Member

    As was suggested I added the ‘inc ‘ in the “JSP Fragment Extensions” box. It still is not working.

    If I have a class com.abc.ClassA and within WEBROOT/jsp/includes/import.inc, I have the following entry:

    <%@ page import=”com.abc.ClassA”%>

    Now within my other JSP’s I have the following declaration:

    <%@ include file=”includes/imports.inc” %>

    Now when I try to validate the JSP, I get the following error:

    ClassA cannot be resolved (in file: “includes/import.inc”)

    This was working perfectly fine prior to ME 3.8

    #216135 Reply

    Scott Anderson
    Participant

    Try making the path either strictly absolute or strictly relative, such as:
    /includes/imports.inc or ../includes/imports.inc

    #216140 Reply

    shankara98
    Member

    I tried giving absolute path: /jsp/includes/import.inc and it didn’t work.

    Even if it worked it’s probably not a feasible solution. We have lot of files and lot of applications have been deployed. Is this change required because of the switchover to Jasper?

    #216154 Reply

    Scott Anderson
    Participant

    Is your project a MyEclipse web project? What’s the web root set to?

    Also, can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.

    #216156 Reply

    Riyad Kalla
    Member

    shankara,
    Can you take a look at my screenshot and see where our setups differ? Using your example from above, I was not able to reproduce your problem:

    Also note that the JSP Fragment list is comma separated, so I have:
    jspf, inc

    in my list.

    #216176 Reply

    shankara98
    Member

    Scott,

    I’ll post the relevant info per the posting guidelines soon.

    Riyad,

    The only difference I can see between our setups is the directory structure. Here’s how my project directory is currently setup (this is the corporate directory structure, which I was told can’t be changed just because I use ME 🙂 )

    src
    |…
    webroot
    |__jsp
    | |__ includes
    | |__ import.inc
    |__WEB-INF
    |__ …

    #216177 Reply

    shankara98
    Member

    Sorry should have previewed before posting – here’s my directory structure:

    src
      |…
    webroot
    |__jsp
    |      |__ includes
    |               |__ import.inc
    |__WEB-INF
             |__ …

    #216234 Reply

    shankara98
    Member

    Scott,

    Here’s the relevant info:

    – System Setup ——————————-
    Operating System and version: Windows 2000 5.00.2195 SP3
    Eclipse version: 3.01
    Eclipse build id: 200409161125
    Fresh Eclipse install (y/n): Y
    If not, was it upgraded to its current version using the update manager?
    Other installed external plugins:
    Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*: 14
    MyEclipse version: 3.8.2
    Eclipse JDK version: jdk142_04
    Application Server JDK version: BEA 8.1 – jdk142_04
    Are there any exceptions in the Eclipse log file? No

    – Message Body ——————————-

Viewing 15 posts - 1 through 15 (of 18 total)
Reply To: JSP compilation problems with .inc files

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