M
Mitch
Hi.
I had written some code which i now plan to deploy (or at least display
its output) using servlets. I have never used servlets before but have
read up on them and am learning as I go. I have finally put a servlet
in amongst my code and am having two major troubles.
1)
My code contains ArrayLists. When i compiled the code before they were
working as expected. Since I have added this code to the
(Automatically generated in NetBeans IDE 4.1) code that outputs the
servlet and jsps in tomcat I get a compiling error on the ArrayLists.
C:\*\src\java\fyp_rail_simulation\RailSimulationSystem.java:46:
generics are not supported in -source 1.4
(try -source 1.5 to enable generics)
As far as i know I have only ever had 1.5 JDK installed on this
machine, and in the projects window if you go to libraries the only two
available in tehre are the "Bundled Tomcat (5.5.7)" and the "JDK 1.5
(Default)".
I have looked through all the generated inf/xml/MF files to find any
references to 1.4 but can not find any. Does anyone have any idea why
this error is occuring or how I might recitify it?
2)
I am unfamilar with servlets, and can find plenty of info on the web
about them, but am having difficulty finding any that give ideas on how
to A) Use anything other than databases and B) Use a servlet as an
addition to existing code rather than creating one from scratch.
For example I would like to go to a page (JSP or servlet) and then from
that page, link to another page which when visited will initialise my
servlet which in turn will intialise my program. Do I still need to
keep the Main method from my existing code [it only contains two lines,
one constructor, and then constructor.run()] or can these be called
from within the servlet succesfully?
Hope that is clear enough, and kind thanks.
Mitch.
I had written some code which i now plan to deploy (or at least display
its output) using servlets. I have never used servlets before but have
read up on them and am learning as I go. I have finally put a servlet
in amongst my code and am having two major troubles.
1)
My code contains ArrayLists. When i compiled the code before they were
working as expected. Since I have added this code to the
(Automatically generated in NetBeans IDE 4.1) code that outputs the
servlet and jsps in tomcat I get a compiling error on the ArrayLists.
C:\*\src\java\fyp_rail_simulation\RailSimulationSystem.java:46:
generics are not supported in -source 1.4
(try -source 1.5 to enable generics)
As far as i know I have only ever had 1.5 JDK installed on this
machine, and in the projects window if you go to libraries the only two
available in tehre are the "Bundled Tomcat (5.5.7)" and the "JDK 1.5
(Default)".
I have looked through all the generated inf/xml/MF files to find any
references to 1.4 but can not find any. Does anyone have any idea why
this error is occuring or how I might recitify it?
2)
I am unfamilar with servlets, and can find plenty of info on the web
about them, but am having difficulty finding any that give ideas on how
to A) Use anything other than databases and B) Use a servlet as an
addition to existing code rather than creating one from scratch.
For example I would like to go to a page (JSP or servlet) and then from
that page, link to another page which when visited will initialise my
servlet which in turn will intialise my program. Do I still need to
keep the Main method from my existing code [it only contains two lines,
one constructor, and then constructor.run()] or can these be called
from within the servlet succesfully?
Hope that is clear enough, and kind thanks.
Mitch.