facebook

how to compile JSP on 1.5?

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #267653 Reply

    ceronj
    Member

    I’m getting the error below despite having configured Tomcat 5.0 with JDK 1.5.0_09. Please advise.

    work\Catalina\localhost\renaissance\org\apache\jsp\jsp\MealSearch_jsp.java:138: generics are not supported in -source 1.3 (try -source 1.5 to enable generics) Map queryList = queryMealCollection.getCollectionMap(); ^ An error occurred at line: 73 in the jsp

    😕

    #267707 Reply

    Riyad Kalla
    Member

    Try upgrading to Tomcat 5.5. It looks like Tomcat is compiling your pages with Source 1.3 compatability.

    Moving to OT > Soft Dev

    #267958 Reply

    ceronj
    Member

    Okay, I upgraded to Tomcat 6.0. The jsp loads okay but when I submit, I get an error. This is the setup. Jsp A launches Jsp B. A and B access a servlet. A is “submitted” without a problem; the URL looks like this: http://localhost:8080/renaissance/servlet/RenaissanceCtrlServlet. But when I “submit” from B and expect to go back to the servlet for processing, I get this URL: http://localhost:8080/renaissance/servlet/servlet/RenaissanceCtrlServlet followed by a 404 error. If I manually remove one “servlet” from the URL it works okay.

    I know it has to be the servlet mappings but I’m not sure how they work. I tinkered with the web.xml file but either it half works or doesn’t work at all for any jsp that POSTs to the servlet. Same code/configuration worked fine with Tomcat 5.0.

    Help!

    #268030 Reply

    ceronj
    Member

    Can I get some feedback on this?

    #268032 Reply

    Riyad Kalla
    Member

    When I took a look at your post nothing sprung out at me… I think it’s the lack of details. Try included snippets from your web.xml file and the URLs and form ACTIONs you are using to post to your servlets. Someone might be able to spot something.

    #269007 Reply

    ceronj
    Member

    Think I know what the problem is but have no idea how to fix it.

    I had to upgrade from Tomcat 5.0 to Tomcat 6.0. I created the project using MyEclipse web app, which used Tomcat 5.0. Note that my project is located in c:\my_projects. When I configured the server, I disabled Tomcat 5.0 and enabled Tomcat 6.0. I tried to start up my application but Tomcat 6.0 couldn’t find my files.

    I looked in jakarta-tomcat-5.0.30/webapps and saw a folder there with my application files (jsp, properties, etc.). The same folder for Tomcat 6.0 (Tomcat 6.0/webapps) did not contain that folder, so I simply copied it from the directory just mentioned.

    I started up Eclipse and everything looked okay at first until I started making changes. I noticed that my jsp were not getting recompiled. Then I realized that Eclipse is referencing the jsp files where my project is actually located (c:\my_projects) but compiling those in the Tomcat 6.0 directory. I know Tomcat needs to see a web app in it’s webapp directory unless you change the context (which I didn’t want to do).

    So, how did this work before? It seemed that the jsp files in c:\my_project were in sync with those in jakarta-tomcat-5.0.30/webapps so any changes were compiled. How do I get the same linking with Tomcat 6.0?

    I don’t understand how MyEclipse setup this project in the first place.

    In other words, HOW DO I UPGRADE TO TOMCAT 6.0 AND STILL USE MYECLIPSE AS I DID BEFORE? There is no simple upgrade procedure that I can see.

    Please advise!

    😡

    #269008 Reply

    Riyad Kalla
    Member

    ceronj,
    You just need to add a new exploded deployment from your project to Tomcat 6, it works exactly the same as before.

    #269495 Reply

    ceronj
    Member

    Ah, that’s what I needed. Works, thanks

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: how to compile JSP on 1.5?

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