Getting Tomcat error- any ideas?

Im on a Uni tomcat server and am getting this error "The requested resource (/05ics42/servlet/SessionServlet) is not available."
I cant change the actual tomcat settings but i dont think its that, all the other students dont have this problem so im thinking the tomcat settings are fine. Im under the impression that it may actually be something in my servlet.
import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class SessionServlet extends HttpServlet
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException, ServletException {
processRequest(req,res);
public void doPost(HttpServletRequest req, HttpServletResponse
res) throws IOException, ServletException {
processRequest(req,res);
public void processRequest(HttpServletRequest req,
HttpServletResponse res) throws IOException, ServletException {
res.setContentType("text/HTML");
PrintWriter out = res.getWriter();
String username = req.getParameter("username");
String password = req.getParameter("password");
Connection con = null;
try {
con = DBConnection.getConnection();
Statement statement = con.createStatement();
ResultSet rs = statement.executeQuery("SELECT * " +
"FROM User_Login" + "WHERE username = '" +
username + "' and " + "password = '" + password + "'");
out.println("<HTML><HEAD><TITLE>Session Servlet</TITLE></HEAD><BODY><CENTER>");
out.println("<br /><br />");
if(!rs.next()) {
out.println("Login Denied");
else {
UserSession.setSession(req,username);
out.println("Welcome " + UserSession.getSession() + "!");
out.println("</center></body></html>");
catch(Throwable th) {
th.printStackTrace();
finally {
try {
con.close();
catch(Throwable e) {
e.printStackTrace();
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class DBConnection
public static String dbDriver;
private static String dbLocation;
private static String dbUsername;
private static String dbPassword;
private static void initialize() {
dbDriver="com.mysql.jdbc.Driver";
dbLocation = "jdbc:mysql://latcs5.cs.latrobe.edu.au/05ics42";
dbUsername="05ics42";
dbPassword="cse32ics";
public static Connection getConnection() {
if(dbDriver == null) {
initialize();
Connection connection = null;
try {
Class.forName(dbDriver);
connection = DriverManager.getConnection(dbLocation,dbUsername,dbPassword);
catch(ClassNotFoundException cnfe) {
System.out.println("DBConnection Not Found: " + cnfe);
catch(SQLException sqle) {
System.out.println("DBConnection: SQL Exception: "+
sqle);
finally{}
return connection;
<web-app>
<servlet>
<servlet-name>ToppingFactory</servlet-name>
<servlet-class>ToppingFactory</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ToppingFactory</servlet-name>
<url-pattern>/servlet/ToppingFactory</url-pattern>
</servlet-mapping>
</web-app>
Any ideas? Thanks for any help Gurus :D

<servlet-class>SessionServlet</servlet-class>Your servlet class MUST have a package. Specify a package for the servlet class, recompile it and place it with the proper directory structure corresponding to the package under WEb-INF/classes for your web application. Then specify the <servlet-class> tag with the fully qualified servlet class name.
It should solve your problem.

Similar Messages

  • Flashbuilder 4 Upgrade from Flex 3 getting following errors any idea

    Hi:
      I'm getting the following 2 errors when I try to compile a swf from Flex 3 to FB4
      Any ideas and how to get around this
      1) 1061: Call to a possibly undefined method addChild through a reference with static type mx.core:INavigatorContent
          this is the AS call
            app.dashboardstack.selectedCild.addChild(panel);
    2) 1118: Implicit coercion of a value with static type mx.core.INavigatorContent to a possibly unrelated type
                 mx.core.Container
            var subjectObject:Container = accordion.selectedChild;
    Thanks, Mike

    You need to read this, http://www.adobe.com/devnet/flex/articles/flex3and4_differences.html and a couple of other related articles in the Flex Developer Center.

  • When editing a template and making changes then saving and closing I get this error any idea?

    Have a user who is on Sharepoint office 365 online and when trying to center a excel spreadsheet icon link to center on a organizational report template then saving and closing the user receives this error:
    An expected error has occured
    Trouble shoot issues with Microsoft Sharepoint foundation
    Correlation ID 0952719c-af2e-20a4-9ee6-e98b1a457d0a
    Any clue what this error indicates?
    Best regards,<br/> <br/> <strong>Joe C<br/> </strong>Partner Online Technical Community<br/> -----------------------------------------------------------------------------------------<br/> We hope you get value from
    our new forums platform! Tell us what you think:<br/> <a href="http://social.microsoft.com/Forums/en-US/partnerfdbk/threads"><span style="color:#0033cc">http://social.microsoft.com/Forums/en-US/partnerfdbk/threads<br/>
    </span></a>------------------------------------------------------------------------------------------<br/> This posting is provided &quot;AS IS&quot; with no warranties, and confers no rights <hr>

    Any ideas?  And Melbourne is right SP 2013 online would be impossible to view those logs unless I open a ticket with MS
    Best regards,<br/> <br/> <strong>Joe C<br/> </strong>Partner Online Technical Community<br/> -----------------------------------------------------------------------------------------<br/> We hope you get value
    from our new forums platform! Tell us what you think:<br/> <a href="http://social.microsoft.com/Forums/en-US/partnerfdbk/threads"><span style="color:#0033cc">http://social.microsoft.com/Forums/en-US/partnerfdbk/threads<br/>
    </span></a>------------------------------------------------------------------------------------------<br/> This posting is provided &quot;AS IS&quot; with no warranties, and confers no rights <hr>

  • Tomcat error,  any idea?

    Hi,
    I am using tomcat container for jsp pages. The problem is that the moment I start tomcat I get following error. I did not even go to browser and has not even loaded any jsp page. this is just initial tomcat startup error. What could be the reason?
    Catalina.start: LifecycleException:  Context startup failed due to previous errors
    LifecycleException:  Context startup failed due to previous errors
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:3578)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
         at org.apache.catalina.core.StandardService.start(StandardService.java:450)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
         at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
         at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
    Stopping service Tomcat-Standalone
    Catalina.stop: LifecycleException:  Coyote connector has not been started
    LifecycleException:  Coyote connector has not been started
         at org.apache.coyote.tomcat4.CoyoteConnector.stop(CoyoteConnector.java:1296)
         at org.apache.catalina.core.StandardService.stop(StandardService.java:499)
         at org.apache.catalina.core.StandardServer.stop(StandardServer.java:2178)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:494)
         at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
         at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)

    I ran into the same snag. Apparently, tomcat v4.1.x has some dependencies on the example web applications deployed in the webapps directory, and removing them causes this silent failure to occur. I fixed the problem by restoring the example webapps, but apparently this can be avoided by using the $TOMCAT_HOME/conf/server-noexamples.xml.config file.
    Good luck!
    Joe Romaine
    Hi,
    I am using tomcat container for jsp pages. The
    problem is that the moment I start tomcat I get
    following error. I did not even go to browser and has
    not even loaded any jsp page. this is just initial
    tomcat startup error. What could be the reason?
    Catalina.start: LifecycleException:  Context startup
    failed due to previous errors
    LifecycleException:  Context startup failed due to
    previous errors
    at
    t
    org.apache.catalina.core.StandardContext.start(Standar
    dContext.java:3578)
    at
    t
    org.apache.catalina.core.ContainerBase.start(Container
    Base.java:1141)
    at
    t
    org.apache.catalina.core.StandardHost.start(StandardHo
    st.java:707)
    at
    t
    org.apache.catalina.core.ContainerBase.start(Container
    Base.java:1141)
    at
    t
    org.apache.catalina.core.StandardEngine.start(Standard
    Engine.java:316)
    at
    t
    org.apache.catalina.core.StandardService.start(Standar
    dService.java:450)
    at
    t
    org.apache.catalina.core.StandardServer.start(Standard
    Server.java:2143)
    at
    t
    org.apache.catalina.startup.Catalina.start(Catalina.ja
    va:463)
    at
    t
    org.apache.catalina.startup.Catalina.execute(Catalina.
    java:350)
    at
    t
    org.apache.catalina.startup.Catalina.process(Catalina.
    java:129)
    at
    t sun.reflect.NativeMethodAccessorImpl.invoke0(Native
    Method)
    at
    t
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMeth
    odAccessorImpl.java:39)
    at
    t
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Delega
    tingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
    at
    t
    org.apache.catalina.startup.Bootstrap.main(Bootstrap.j
    ava:156)
    Stopping service Tomcat-Standalone
    Catalina.stop: LifecycleException:  Coyote connector
    has not been started
    LifecycleException:  Coyote connector has not been
    started
    at
    t
    org.apache.coyote.tomcat4.CoyoteConnector.stop(CoyoteC
    onnector.java:1296)
    at
    t
    org.apache.catalina.core.StandardService.stop(Standard
    Service.java:499)
    at
    t
    org.apache.catalina.core.StandardServer.stop(StandardS
    erver.java:2178)
    at
    t
    org.apache.catalina.startup.Catalina.start(Catalina.ja
    va:494)
    at
    t
    org.apache.catalina.startup.Catalina.execute(Catalina.
    java:350)
    at
    t
    org.apache.catalina.startup.Catalina.process(Catalina.
    java:129)
    at
    t sun.reflect.NativeMethodAccessorImpl.invoke0(Native
    Method)
    at
    t
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMeth
    odAccessorImpl.java:39)
    at
    t
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Delega
    tingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
    at
    t
    org.apache.catalina.startup.Bootstrap.main(Bootstrap.j
    ava:156)

  • When trying to install adobe photoshop cs4 on my new computer with windows 7 home premium and get a message to contact adobe because of an error. any ideas

    when trying to install adobe photoshop cs4 on my new computer with windows 7 home premium and get a message to contact adobe because of an error. any ideas

    JJMack <[email protected]> wrote:
    =============
    JJMack  created the discussion
    "when trying to install adobe photoshop cs4 on my new computer with windows 7 home premium and get a message to contact adobe because of an error. any ideas"
    To view the discussion, visit: https://forums.adobe.com/message/7092876#7092876

  • I cant get into itunes producer keep getting an error my username and password is incorrect. i have made a new one all good still same error any ideas?

    I cant get into itunes producer keep getting an error my username and password is incorrect. i have made a new one all good still same error any ideas?

    I'm having a very similar problem.
    I'm based in the U.K. and am trying to publish an iBook through the iTunes bookstore. I have made my book in iBooks author 2.0. My iTunes is up to date.
    When I try and publish the iBook I have passed and ticked the Pre Publish Check; and the Create Account, but when I try and download iTunes Producer through iTunes Connect I'm told "Your Apple ID does not have permission to access iTunes Content."
    When I try and re-set my iTunes Store account I'm told "The iTunes Store Account has already applied to distribute content on the iBookstore." Of course it has I just did that.
    If I try and sign in to iTunes Connect through the Publishing pane I'm told "Your ID or Password was entered incorrectly." Even though I've just used it to sign into iTunes (and here), so my password and Apple ID work fine elsewhere.
    Is my access to the iTunes Connect being delayed while my submission is processed, i.e. the processing of my tax and account details? Or am I stuck in a loop?
    If this is still processing (I started this 20 hours ago) I assume that I have to submit the book itself when I can download iTunes Producer at a later date, as I haven't submitted the book yet?
    I emailed the problem to iTunes Store and was refered to [email protected], only for them to say they don't read or reply to emails sent to that address??????
    I'm not sure which part of the process I've reached - if any. I feel I'm in limbo. I have an iBook ready to go - but where is Apple?
    Any help would be most welcome.
    Andy

  • I cannot reset my photostream, when I do so, I get an error message that says, " Your Photostream could not be reset at this time due to a server error"  Any ideas?

    I cannont reset my photostream, when I attempt to do so I get an error message that says, " Your Photostream could not be reset at this time due to server error"  Any Ideas?

    Been like this for a couple of days.  Is this something that happens from time to time?

  • When I try to export a photo to my desktop I get the followiing error message "Export Versions Complete with Errors" any ideas why?

    when I try to export a photo to my desktop I get the followiing error message "Export Versions Complete with Errors" any ideas why?

    Have you tried to export different images as a test to see if it is related to the one you are getting the error on? Also try to export to a different folder other then the Desktop, again to see if the problem is connected to that folder.
    Another thing to do is run the Aperture Library First Aid on the library. Hold the option and command keys down while you start Aperture. First run the Permission Repair and see if that helps. If not quit Aperture and restart and run the Library Repair and try.
    Post back if you still have problems
    regards

  • HT204408 I keep getting this error message trying to get into facetime, any ideas? "The server encountered an error processing your registration, please try again later"

    I keep getting this error message trying to get into facetime, any ideas? "The server encountered an error processing your registration, please try again later"

    Hello Mikeytsmith
    Check out the article below for troubleshooting the issue of activating FaceTime for Mac.
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • I've attempted to download Mac 10 Maverick and I keep getting a download error, any ideas?

    I've attempted to download Mac X Maverick and I keep getting a download error, any ideas?

    Without the error message it is only a guess but how about something isn't working

  • I cloud gives me the following message when I try and log in "you can't log in because of a server error" any ideas?

    I cloud gives me the following message when I try and log in "you can't log in because of a server error" any ideas?

    Hi spillgar,
    If you are having issues signing in to iCloud from your Windows machine, you may find the following articles helpful:
    iCloud: Account troubleshooting
    http://support.apple.com/kb/ts3988
    iCloud: If you can’t sign in to iCloud.com
    http://support.apple.com/kb/ph2611
    Regards,
    - Brenden

  • Final Cut Pro X keeps freezing when sharing my work to You Tube, it does about 90% of the upload and then seems to get stuck.  Any ideas on how to resolve this please?

    Final Cut Pro X keeps freezing when sharing my work to You Tube, it does about 90% of the upload and then seems to get stuck.  Any ideas on how to resolve this please?

    this is a perfect question to ask the users in the FCP X forum.  Good luck.  https://discussions.apple.com/community/professional_applications/final_cut_pro_ x

  • I am exporting a pages doc to ePub and I keep getting formatting problems any idea thx in advance

    I am exporting a pages doc to ePub and I keep getting formatting problems any idea thx in advance

    Since you don't say what the "formatting problems" are, all we can say is:
    "There, there. Hope they get better."
    Peter

  • Just hooked up my APPLE TV to my Pioneer Elite Pro 1120 HD Just hooked up my APPLE TV to my Pioneer Elite Pro 1120 HD TV (2004/05). I get picture fine (although only 720p), but I can't get sound. Any ideas? I have a Optical Digital Audio cable, but not su

    Just hooked up my APPLE TV to my Pioneer Elite Pro 1120 HD Just hooked up my APPLE TV to my Pioneer Elite Pro 1120 HD TV (2004/05). I get picture fine (although only 720p), but I can't get sound. Any ideas? I have a Optical Digital Audio cable, but not sure where to hook up?

    how is it connected?
    if you use a hdmi to dvi converter then you only get picture and not audio because dvi don't carry audio same with vga

  • The keyboard on my ipad has disappeared and I can't seem to get it back.Any ideas how to get my keyboard back?

    the keyboard on my ipad has disappeared and I can't seem to get it back.Any ideas how to get my keyboard back?

    Standard troubleshooting steps in order are as follows - checking after each one to see if the problem is resolved:
    Power your iPad off and on.
    A reset, which is done by pressing and holding the home button and the sleep/wake or on/off button simultaneously until you see the Apple logo and then release.
    Restore your iPad with iTunes from your iPad's backup.
    Restore your iPad with iTunes as a new iPad or not from your iPad's backup.

Maybe you are looking for

  • Array problem in Photo Gallery

    I want to have an array of buttons that each move with mouse over and mouse out. Then once user clicks the button the image is loaded from an array and put onto the screen. Once another button is clicked say B2 the B1 image is removed and a new image

  • On my iphone4s, music control do not show up on the screen and the screen cannot be rotated.

    On my iphone4s, music control do not show up on the music screen and the screen cannot be rotated.

  • Application invoked from portable space (USB) Crashed on windows 8.1 OS

    Hello , I have an application available on portable USB Drive (Memory present on external controller ), I can open this application on PC when USB is connected to PC. USB will act like mass storage device ,and  application code is kept inside mass st

  • Convert from mysql db to oracle

    hi all, i want to convert data from mysql database to oracle database. what kind of mechanism i want to use? if any mechanism like DTS in SQLserver is there to covert?

  • Control bar problems

    My control bar seems to ignore the flashvars used. It autoplays and hides even though set to false. My code <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ver