| | |
tomcat eclipse jsp problem
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2009
Posts: 6
Reputation:
Solved Threads: 0
Hi,
I am trying to setup a tomcat server in eclipse galileo java ee to test a simple JSP page. I have problem, but no solution to it. So, if i want to see http://localhost:8080/Project/WEB-INF/Hello.jsp, it gives me error page
HTTP Status 404 - /Project/WEB-INF/Hello.jsp
I have tried to change server location (default server location was "use workspace metadata") , so if I put option "use Tomcat installation", it gives me Tomcat default page on http://localhost:8080 ,
but for Hello. jsp it gives me same error. Last option "use custom location" isn't even available.
Can someone please help me if you have succedeed to resolve it?
I have tried other related problems, but they were solved in other version of Eclipse where this problem is solved by uncheking box
"Run modules directly from the workspace". I don't see this option here, so I am stuck.
Thanks.
I am trying to setup a tomcat server in eclipse galileo java ee to test a simple JSP page. I have problem, but no solution to it. So, if i want to see http://localhost:8080/Project/WEB-INF/Hello.jsp, it gives me error page
HTTP Status 404 - /Project/WEB-INF/Hello.jsp
I have tried to change server location (default server location was "use workspace metadata") , so if I put option "use Tomcat installation", it gives me Tomcat default page on http://localhost:8080 ,
but for Hello. jsp it gives me same error. Last option "use custom location" isn't even available.
Can someone please help me if you have succedeed to resolve it?
I have tried other related problems, but they were solved in other version of Eclipse where this problem is solved by uncheking box
"Run modules directly from the workspace". I don't see this option here, so I am stuck.
Thanks.
General folder-file structure of project under Tomcat is
Have look at this materials
- TOMCAT_DIRECTORY
- webapps
- PROJECT_NAME
- *.jsp
- *.img
- *.css
- WEB-INF
- web.xml
- classes
- *.java or copiled *.class
- lib
- Any libraries required like ConnectorJ(database connector) etc.
- PROJECT_NAME
- webapps
Have look at this materials
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Please package your project in ZIP/RAR and attach to next reply and we will have look at it (you need to be in advanced reply mode to see "Manage Attachments" button so first press "Go Advanced")
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
None of the attached packages has folder structure of project. We need to see stuff that is in TOMCAT_DIRECTORY/webapps/YOUR_PROJECT.
For example at this point I have following files in my webapps
so if we discussed "hudson" I would package that folder and attach it. In your scenario it is anything what is listed in your "Project" directory (that is the place where you started to write your code from what I see in your post localhost:8080/Project/WEB-INF/Hello.jsp)
For example at this point I have following files in my webapps
so if we discussed "hudson" I would package that folder and attach it. In your scenario it is anything what is listed in your "Project" directory (that is the place where you started to write your code from what I see in your post localhost:8080/Project/WEB-INF/Hello.jsp)
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
•
•
Join Date: Sep 2009
Posts: 6
Reputation:
Solved Threads: 0
Hi,
sorry for wrong packages .
When I use Eclipse IDE Galileo, in Overview page I see that deploy path is set on default to TOMCAT_DIRECTORY/wtpwebapps directory, as you can see in picture I have attached. Maybe that is also problem because it is created there. With this, I can't see
http://localhost:8080/Project/WEB-INF/Hello.jsp or http://localhost:8080.
I then changed to option use " Use Tomcat configuration", and set it to TOMCAT_DIRECTORY/webapps. Now, the Project folder is in webapps like you told me. I am sending you that Project folder in zip.
With this change, I can see http://localhost:8080 ( there is Tomcat default web page ) , but not http://localhost:8080/Project/WEB-INF/Hello.jsp .
I hope now it is ok.
But if I don't solve this,
can you recommend then what Eclipse IDE version ,
Tomcat version, Java version etc. I should install to avoid this problem, and try to write some code
.
Thanks.
sorry for wrong packages .
When I use Eclipse IDE Galileo, in Overview page I see that deploy path is set on default to TOMCAT_DIRECTORY/wtpwebapps directory, as you can see in picture I have attached. Maybe that is also problem because it is created there. With this, I can't see
http://localhost:8080/Project/WEB-INF/Hello.jsp or http://localhost:8080.
I then changed to option use " Use Tomcat configuration", and set it to TOMCAT_DIRECTORY/webapps. Now, the Project folder is in webapps like you told me. I am sending you that Project folder in zip.
With this change, I can see http://localhost:8080 ( there is Tomcat default web page ) , but not http://localhost:8080/Project/WEB-INF/Hello.jsp .
I hope now it is ok.
But if I don't solve this,
can you recommend then what Eclipse IDE version ,
Tomcat version, Java version etc. I should install to avoid this problem, and try to write some code
.Thanks.
If you able to see something on localhost:8080 then you will see Tomcat Manager option on left, which you need to click on. Login pop-up will show and you need to provide username and password for tomcat (if you do not know this, you can found these data in TOMCAT_DIRECTORY/conf/tomcat-users.xml). After this you are provided with list of projects in your webapps directory. This still wouldn't work as you do not have your JSP file in correct location and is it having wrong name for welcome-file.
Simple corrections:
Simple corrections:
- move Hello.jsp from WEB-INF folder level up to Project
- make following change to web.xml inside WEB-INF folder (you can either comment out the lines as I did or just simple delete them)
XML Syntax (Toggle Plain Text)
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>Project</display-name> <welcome-file-list> <!-- <welcome-file> index.html</welcome-file> --> <!-- <welcome-file> index.htm</welcome-file> --> <welcome-file>Hello.jsp</welcome-file> <!-- <welcome-file> default.html</welcome-file> --> <!-- <welcome-file> default.htm</welcome-file> --> <!-- <welcome-file> default.jsp</welcome-file> --> </welcome-file-list> </web-app>
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
No problem. Beside already linked Tomcat official website Head First - Servlets and JSP and Tomcat Definitive Guide are good resources to have look at
PS: Can you please mark thread as solved? Just click on "Mark as Solved" bellow last reply. (Small measurement so some "bright" person wouldn't jump on it and try to answer after 1-2 years). Thanx
PS: Can you please mark thread as solved? Just click on "Mark as Solved" bellow last reply. (Small measurement so some "bright" person wouldn't jump on it and try to answer after 1-2 years). Thanx
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
![]() |
Similar Threads
- using eclipse for jsp (JSP)
- Hosting your own JSP web application on Tomcat (JSP)
- JSP problem on Tomcat 5.5.12 (JSP)
- Stopping a very time consuming class method's execution on tomcat server using JSP. (JSP)
- Sending data from a JSP to javaBean that then enters into Access database (JSP)
- JSP problem (JSP)
- Problem with jsp include directive in iPlanet. Working in Tomcat. (JSP)
- tomcat jsp problem (JSP)
- [urgent] JSP problem (JSP)
- Apache Tomcat and IIS 6 with JK2 (Windows Servers and IIS)
Other Threads in the JSP Forum
- Previous Thread: Uploading Images to The DB
- Next Thread: Error with image button in IE
| Thread Tools | Search this Thread |
Tag cloud for directorystructure, eclipse, tomcat
actuate adobe air ajax amf android bi birt businessintelligence carbonfootprint carbonfund.org co2emissions developmenthelp directorystructure dojofoundation eclipse equinox error flash flex ganymede genuitec green ibm java jni jsp lego linux myeclipse php plugin problem reporting repositories ria sourcelabs ssl support tomcat vb.net zend







