Start New Discussion within our Software Development Community

Hello,

I downloaded some code from coreservlets.com and put the code on BEA WebLogic 8.1. The code is actually from ch4 of the book "Core Servlets and Java Server Pages (Hall/Brown)".

I wanted to run a particular html form that one fills out then goes to a servlet. The html form works just fine, it's just when I click on the form it is supposed to go to a servlet for output and instead I get a 'page not found message'. The app built with no errors and deployed successfully...

Now, the line on the html form from the books says...

<FORM ACTION="./servlet/coreservlets.ThreeParams">

but since i am running it on WebLogic, the folder hierarchy is different. The only way I can get the code window to not say that the file exists (any other way it tells me that the page does not exist with a green line under it) is to write the line as so...

<FORM ACTION="./WEB-INF/classes/coreservlets/ThreeParams.class">

Can someone tell me what would have to be done in order to get the Servlet page to appear instead of an error message, the files i used from the book are attached to this thread as well in a zip file.

You did not configure your web.xml file something like

<servlet>
    <servlet-name>LoginServlet</servlet-name>
    <servlet-class>LoginServlet</servlet-class>  
</servlet>

<servlet-mapping>
    <servlet-name>LoginServlet</servlet-name>
    <url-pattern>/login</url-pattern>
</servlet-mapping>

Here is info in regards of web.xml configuration and servlet mapping with additional info

This article has been dead for over six months. Start a new discussion instead.