Results 1 to 2 of 2
- 03-05-2011, 06:00 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 1
- Rep Power
- 0
Unable to access servlet after publishing website
Hi I need help :(
I'm trying to deploy a website via an interface called cpanel that is provided by the hosting co.
The directories I have at the moment are:
- public_html
- images
- WEB_INF
- classes
- lib
My JSP files are in the public_html folder and servlets are in the classes folder.
On my home.jsp i have the following form:
<form name='LoginForm' action='servlet/UserLogin'> ... </form>
(initially I wrote the action attribute as='UserLogin' but it returns an error saying resource is not found. According to e hosting co I need to specify the action attribute as above. Its kinda strange as I dont have a servlet folder to begin with. Anyway it works.)
So upon submission of the form I'll get to the UserLogin servlet. At the end of the servlet, I used the following to return control to my home page:
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/home.jsp");
dispatcher.forward(request, response);
But this will take me to www.domain.com/servlet/home.jsp which is non-existent.
Any idea how I can resolve this? My hosting co doesnt seem to know what theyre doing.. unfortunately.
- 03-21-2011, 07:54 AM #2
Member
- Join Date
- Mar 2011
- Location
- chennai
- Posts
- 55
- Rep Power
- 0
Similar Threads
-
how to save many users name in 1 textbox on website from servlet
By gardiann in forum Java ServletReplies: 0Last Post: 12-24-2010, 08:33 AM -
how to run servlet from a real website
By mr_anderson in forum Java ServletReplies: 0Last Post: 12-01-2010, 01:21 AM -
how to login to website to get access using java?
By theChameleon in forum Advanced JavaReplies: 0Last Post: 10-29-2010, 06:20 PM -
JSP Unable to access the third party libraries
By VJSFDeveloper in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 09-08-2008, 04:57 PM -
Unable to Run Servlet
By basark in forum Java ServletReplies: 4Last Post: 07-11-2008, 08:08 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks