This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes UrlRewriting+servlets -Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "UrlRewriting+servlets -Error" Watch "UrlRewriting+servlets -Error" New topic
Author

UrlRewriting+servlets -Error

Vas Miriyala
Ranch Hand

Joined: Sep 14, 2009
Posts: 114

I am developing a java servlet program using url-rewriting and i have created three servlets and after entering first number by using FirstNumber.java servlet then when i press Next button it came up with messagw which says "The Requested resource is not available"
here is the code
FirstNumber.java


SecondNumber.java


Sum.java

web.xml
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi, Srinivas.

In FirstNumber.java there is
"action=\"http://localhost:8080/urlrewriting/SecondNumber\">"


Here 'urlrewriting' is package. We should not call like this.

Use relative path in FirstNumber.java and modify SecondNumber.java like
Vas Miriyala
Ranch Hand

Joined: Sep 14, 2009
Posts: 114

thanks for your reply and let me go through and i will let you know what happen
Vas Miriyala
Ranch Hand

Joined: Sep 14, 2009
Posts: 114

after changing got lot of errors
code after modifications
FirstNumber.jaba



Errors
Vas Miriyala
Ranch Hand

Joined: Sep 14, 2009
Posts: 114

program is compiled after changing the necessary quotations and got problem which browser returns HTTP Status 405 - HTTP method GET is not supported by this URL
Chinmaya Chowdary
Ranch Hand

Joined: Apr 21, 2008
Posts: 432
Hi, Srinivas.

Modify FirstNumber.java as,


and SecondNumber.java as,
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: UrlRewriting+servlets -Error
 
Similar Threads
Can't access HTML form page in browser
HTTP status 404 error on page
Doubt in servlet program using eclipse IDE
Problem:The requested resource (/ShowParameters) is not available
problems in URL rewriting