Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-13-2007, 12:00 AM
Member
 
Join Date: May 2007
Posts: 39
Alan is on a distinguished road
servlets and myjavaserver
I have a problem and not I don´t know where I have the mistake.
I have a count in myjavaserver and I am trying to test a servlet but I don´t obtain good results the page always returns me "404 not found".

in the root of my directory I have this:
/WEB-INF/classes/com/bloodredsun/servlet/

inside of this I have this file:
ExampleServlet.class
this servlet has that:
response.getWriter().println("<b>hello</b>world!!!")"

in web.xml I have this:
Code:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>ExampleServlet</servlet-name> <servlet-class>com.bloodredsun.servlet.ExampleServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>ExampleServlet</servlet-name> <url-pattern>/ExampleServlet.do</url-pattern> </servlet-mapping> <session-config> <session-timeout> 30 </session-timeout> </session-config> <welcome-file-list> <welcome-file> index.jsp </welcome-file> <welcome-file> index.html </welcome-file> <welcome-file> index.htm </welcome-file> </welcome-file-list> </web-app>
When I write this link:

http://www.myjavaserver.com/~afluben...mpleServlet.do

this message appear:
The requested URL /~aflubenov/ExampleServlet.do was not found on this server.
Do you know what is happening?
thank a lot
alan

Last edited by Alan : 06-01-2007 at 02:49 AM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-08-2007, 06:36 PM
Member
 
Join Date: Jun 2007
Posts: 2
jitendra.ibs is on a distinguished road
<servlet-mapping>
<servlet-name>ExampleServlet</servlet-name>
<url-pattern>/ExampleServlet.do</url-pattern>
</servlet-mapping>

i n place of this mapping u try
<servlet-mapping>
<servlet-name>ExampleServlet</servlet-name>
<url-pattern>/servlet/ExampleServlet</url-pattern>
</servlet-mapping>

it will work
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
1 form 2 servlets sandor Java Servlet 2 01-22-2008 11:47 AM
Deploying Servlets gapper New To Java 2 01-17-2008 01:43 PM
servlets or jsp krishnapal Advanced Java 1 12-13-2007 03:31 PM
Servlets nagaroopanandha Advanced Java 1 08-07-2007 03:09 PM
Introduction to Servlets JavaForums Java Blogs 0 08-04-2007 03:24 AM


All times are GMT +3. The time now is 06:21 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org