molleman
molleman

Reputation: 2946

question on regular servlets within GWT (working in dev mode ,not working in deployment in tomcat)

i am having trouble with my web application developed in GWT. the application allows users to upload and download using an upload servlet and a download servlet, the upload servlet was created using the gwtUpload library. the download servlet is using regular HTTPServlet.

when i run the application within eclipse the download servlet works fine, when i deploy it to tomcat, when a user selects to upload a file, the file does not download, when a user selects a link to download a file, this error is returned

type Status report

message /testhibernategilead/downloadServlet

description The requested resource (/testhibernategilead/downloadServlet) is not available.

can anyone explain why this is

Upvotes: 1

Views: 1173

Answers (2)

Sari Alalem
Sari Alalem

Reputation: 11

I think this is due to the application's root directory misconfiguration in tomcat.

You can try adding the module base to your URL like this:

String servlet_url = GWT.getModuleBaseURL()+"testhibernategilead/downloadServlet";

Remember: GWT.getModuleBaseURL() puts a "/" at the end of the returned string.

Upvotes: 1

BalusC
BalusC

Reputation: 1109522

The requested resource (/testhibernategilead/downloadServlet) is not available.

This is the same as a 404 Page Not Found. In other words, the URL is wrong, or the requested resource is indeed actually not there where you expect it to be.

If you are certain that the URL is correct, then you need to read the server logs if the server and the servlets started without problems. If a servlet fails during startup, then it will be unavailable that way.

Upvotes: 2

Related Questions