| | |
ERRor:Requested Source not available
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2008
Posts: 142
Reputation:
Solved Threads: 0
Hi,
I have deployed my folder called Library in web apps tomcat5.5, i can find my folder in the tomcat manager, but when i click its showing this error: requested source in not available (Library)
As i am new to this i dont know how to proceed please help me out.
i given my code below.
in folder library
i have created 2 more folder WEB-INF and html file
In WEB-INF- src,classes,web.xml
in src file the following code is written
in web.xml the fallowing code is written
I have deployed my folder called Library in web apps tomcat5.5, i can find my folder in the tomcat manager, but when i click its showing this error: requested source in not available (Library)
As i am new to this i dont know how to proceed please help me out.
i given my code below.
in folder library
i have created 2 more folder WEB-INF and html file
In WEB-INF- src,classes,web.xml
html Syntax (Toggle Plain Text)
so in html file the fallowing code is written <html> <head><title>Login Page</title></head> <body> <form method=get action="/servlets/login"> <table> <tr> <td>Name: </td> <td><input type="text" Name="name"></td> </tr> <tr> <td>Password:</td> <td><input type="password" Name="password"></td> </tr> <tr> <td><input type ="submit" value="submit"></td> <td> </td> </tr> </table> </body> </html>
java Syntax (Toggle Plain Text)
import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class valid extends httpservlet { public void doGet(HttpServletRequest res, HttpservletResponse res)throws IOException, ServletException { res.setcontent type("text/html"); PrintWriter out = res.getWriter(); String name = req.getParameter("name"); String password = req.getParameter("password"); out.println("<html>"); out.println("<head>"); out.println("<title> login page </title>"); out.println("<body>"); out.println("Name "+ name); out.println("<br>"); out.println("your password is " + password ); out.println("</body>"); out.println("</html>"); out.close(); } //end of service } //end of class
xml Syntax (Toggle Plain Text)
<web-app> <servlet> <servlet-name>firstservlet</servlet-name> <servlet-class>valid</servlet-class> </servlet> <servlet-mapping> <servlet-name>firstservlet</servlet-name> <url-pattern>/login</url-pattern> </servlet-mapping> </web-app>
That happens because when you click on your web application directly from tomcat, it goes to the ROOT of your web application and unless you have a set a welcome page in your web.xml ( or enabled directory listing) you are bound to get that error.
So to actually display your html page in your browser you would have to type "http://localhost:8080/<webappfolder>/<htmlpage>"
So to actually display your html page in your browser you would have to type "http://localhost:8080/<webappfolder>/<htmlpage>"
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
"How to ask questions the smart way ?"
"How to ask questions the smart way ?"
![]() |
Similar Threads
- Error: Requested resource not available for Servlet (JSP)
- HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed becau (ASP.NET)
- error -- Generic Host Process for Win 32 Services (Windows NT / 2000 / XP)
- I NEED HELP WITH "Generic Host Process for Win32 Services ERROR" (Viruses, Spyware and other Nasties)
- Automatic Updates Error (Viruses, Spyware and other Nasties)
- Generic host error (Viruses, Spyware and other Nasties)
- error 1311 source not found. 150000 cab (Java)
- Error with tables overlapping (PHP)
- Add/Remove Tool Corrupted (Windows NT / 2000 / XP)
- Application Error 0x00000024 (Windows NT / 2000 / XP)
Other Threads in the JSP Forum
- Previous Thread: Xml validation disabled
- Next Thread: xml mapping in tomcat 5.5
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web






