Kindly Help Me in This Servlet...

the error is.. Can not issue data manipulation statements with executeQuery(). i cant.. update my database and also i cant delelete..
what wrong in this servlet..
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Servlet1 extends HttpServlet
Connection con = null;
Statement stat = null;
ResultSet result = null;
public void init(ServletConfig config) throws ServletException
super.init(config);
public void destroy()
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
try
     out.println("<html>");
out.println("<head></head>");
out.println("<body>");
String table = "Employee";
String field1 = "Firstname";
String field1_label = "First Name";
String field2 = "Lastname";
String field2_label = "Last Name";
String field3 = "Middlename";
String field3_label = "Middle Name";
String db_host = "localhost";
String db_user = "root";
String db_pass = "root";
String db = "murach?";
String query = "";
String url = "jdbc:mysql://"+db_host+"/" + db;
String driver = "org.gjt.mm.mysql.Driver";
Class.forName(driver);
con = DriverManager.getConnection(url, db_user, db_pass);
stat = con.createStatement();
String sort = request.getParameter("sort")+"";
String read = request.getParameter("read")+"";
String update = request.getParameter("update")+"";
String delete = request.getParameter("delete")+"";
String field1_value = request.getParameter("field1_value")+"";
String field2_value = request.getParameter("field2_value")+"";
String field3_value = request.getParameter("field3_value")+"";
out.println("<html>");
out.println("<head><title>Products Update</title></head>");
out.println("<script language=\"JavaScript\">");
out.println("function focusform() {");
out.println("document.forms[1].field1_value.focus();");
out.println("}");
out.println("</script>");
out.println("<head>");
out.println("<center><body bgcolor=pink OnLoad=\"focusform()\">");
if (!update.equals("null"))
     //query = "replace into" + table + "("+ field1 +",'"+ field2 +",'"+ field3 +"') values ("+ field1_value+",'"+ field2_value +",'"+field3_value+"')" ;
     query = "update" + table + " set " + field1 + "=\"" + field1_value + "\" , " + field2 + "=\"" + field2_value + "\"," + field3 + "=\"" + field3_value + "\"where Code="+ update;
     result = stat.executeQuery(query);
if (!delete.equals("null"))
     query = "delete from " + table + " where Code=" + delete;
if (!query.equals(""))
     result = stat.executeQuery(query);
query = "select * from " + table;
if (sort.equals("null")) sort=field1;
if (sort.equals("Code")) query+=" order by Code";
if (sort.equals(field1)) query+=" order by " + field1;
if (sort.equals(field2)) query+=" order by " + field2;
if (sort.equals(field3)) query+=" order by " + field3;
if (!read.equals("null"))
query = "select * from " + table + " where Code=" + read;
result = stat.executeQuery(query);
out.println("<table border=1 cellspacing=0>");
out.println("<tr>");
out.println("<td><a href=\"" + request.getRequestURL() + "?sort=Code\">Code</a></td>");
out.println("<td><a href=\"" + request.getRequestURL() + "?sort=" + field1 + "\">" + field1_label + " </a></td>");
out.println("<td><a href=\"" + request.getRequestURL() + "?sort=" + field2 + "\">" + field2_label + "</a></td>");
out.println("<td><a href=\"" + request.getRequestURL() + "?sort=" + field3 + "\">" + field3_label + "</a></td>");
out.println("<td colspan=2>");
out.println("</td>");
out.println("</tr>");
if (read.equals("null"))
while(result.next())
out.println("<tr>");
out.println("<td>");
out.print(result.getString(1));
out.println("</td>");
out.println("<td>");
out.print(result.getString(2));
out.println("</td>");
out.println("<td>");
out.print(result.getString(3));
out.println("</td>");
out.println("<td>");
out.print(result.getString(4));
out.println("</td>");
out.println("<td><a href=\"" + request.getRequestURL() + "?read=" + result.getString(1) + "\">Edit</a></td>");
out.println("<td><a href=\"" + request.getRequestURL() + "?delete=" + result.getString(1) + "\">Delete</a></td>");
out.println("</tr>");
else
while(result.next())
out.println("<form action=\"" + request.getRequestURL() + "\" method=\"post\"> " + "\t <input type=hidden name=update value=" + result.getString(1) + ">");
out.println("<tr>");
out.println("<td>");
out.print(result.getString(1));
out.println("</a></td>");
out.println("<td><input type=text size=10 name=field1_value value=" + result.getString(2) + "></td>");
out.println("<td><input type=text size=10 name=field2_value value=" + result.getString(3) + "></td>");
out.println("<td><input type=text size=15 name=field3_value value=" + result.getString(4) + "></td>");
out.println("<td colspan=2 align=center><input type=submit value=\" Do it! \"></td>");
out.println("</tr>");
out.println("</form> ");      
stat.close();
con.close();
out.println("</table>");
catch(ClassNotFoundException e)
     out.println("Couldn't load database driver: " + e.getMessage());
catch(SQLException e)
     out.println("SQLException caught: " + e.getMessage());      
finally
     try
          if (con != null) con.close();
     catch (SQLException ignored)
out.close();
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException
processRequest(request, response);
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException
processRequest(request, response);
public String getServletInfo()
return "4 Column ProductUpdate Java Servlet using MySQL.";
hope you can help me about this..

what is the entry in the tnsnames.ora for HRMIS? I am accessing thru client machine :
In tnsnames.ora file
HRMIS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.11.93)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = hrmis)
HRMIS_HRMIS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = hrmis)(PORT = 1521))
(CONNECT_DATA =
(SID = hrmis)
(SERVER = DEDICATED)
In sqlnet.ora
# sqlnet.ora Network Configuration File: D:\Oracle\product\10.1.0\Client_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

Similar Messages

  • TS3694 hello out there ! am trying to restore my ios, but toward the end of the process, i am receiving an error message like "the iphone could not be restored, an unknown error occured(1015). Kindly help me resolve this problem, my iphone has been down f

    hello good samaritan out there ! am trying to restore my ios for for i phone 3G, but toward the end of the process, i am receiving an error message like "the iphone could not be restored, an unknown error occured(1015). Kindly help me resolve this problem, my iphone has been down for a we

    mazunzo tembo wrote:
    "the iphone could not be restored, an unknown error occured(1015).
    Unauthorized modification of iOS  >  http://support.apple.com/kb/HT3743
    ERROR 1015...
    This Error Code is indicative of the Device being jailbroken / Hacked...
    Sorry... But...
    The discussion of Jailbroken Devices is against the Terms of Use of this Forum.
    You will need to look elsewhere.

  • I would like to remove a short gray edge from two images. I need help in that I am not yet able to use PhotoShop. Could somebody kindly help me with this?

    I would like to remove a short gray edge from two images. I need help in that I am not yet able to use PhotoShop. Could somebody kindly help me with this?

    I doubt it Doc Maik, but I am certainly happy to learn The image is this one (and a similar one). They would be beautiful portraits if not for the "extra mouth". The grey edge that I would like to remove is the excess of (grey) mouth that is actually my horse's chin, but that in the pictures looks like a wider, looping mouth. Practically, looking at the picture, the "extra mouth" to the left. What I would love it to be able correct that to look like a normal mouth, which means that half of the protruding edge should be removed. I am not sure I was able to explain myself, but here is one of the two pictures. I thank you for you kindness in being available to advise me.

  • HT203390 even when i insert my sim card it says insert your sim card kindly help me in this regard i cant use my phone

    even when i insert my sim card it says insert your sim card kindly help me in this regard i cant use my phone

    Sounds like the phone was jailbroken or hacked to unlock it. Was it?

  • I am new to the ethernet communicat​ion using labview. I do not have any hardware. I have two laptop i need to send and recieve the data via these 2 laptop using labview. Kindly help me on this.

    i am new to the ethernet communication using labview. I do not have any hardware. I have two laptop i need to send and recieve the data via these 2 laptop using labview. Kindly help me on this.
    Solved!
    Go to Solution.

    Hi thanks for the help.
    Actually i am trying to send 10 sine signals from server pc to client pc. So i will bundle 10 signals in server pc and send it and in client pc i am unbundling it and need to save in TDMS format.
    Till unbundling i was able to do. TDMS format it is saving only last value. I need to save all the values. Kindly help me on same. I am attaching both the VI.
    Attachments:
    Client.vi ‏62 KB
    Server.vi ‏252 KB

  • HT4009 I can not buy in-app purchase in application name clash of clan My balance in Apple ID is sufficient to buy that item. Please kindly help me on this issue.Your help would be appreciated.

    I can not buy in-app purchase in application name clash of clan My balance in Apple ID is sufficient to buy that item. Please kindly help me on this issue.Your help would be appreciated.

    What happens when you tru buy items in it ?
    If you are getting a message to contact iTunes support then you can do so via this page and ask them why the message is appearing (we won't know why) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    If it's a different problem ... ?

  • I have bought used I phone 4s. I cloud fails to accept my apple ID, which is accepted by I tunes. In fact it says that I have used maximum number of user accounts. Kindly help me in this matter.

    I have bought used I phone 4s. I cloud fails to accept my apple ID, which is accepted by apple store and I tuned.
    It says that I have already used maximum number of user accounts. Kindly help to resolve this problem.

    Hello Renvin29,
    It sounds like you need to disable your iPhone remotely. I'm sorry to hear about your phone! The only way to do this with is Apple services is if you had Find my iPhone enabled. You have 2 options:
    You can use this article to put the phone into Lost Mode and preserve your data on it, but prevent access to it:
    iCloud: Use Lost Mode
    http://support.apple.com/kb/PH2700
    Or you can just erase it remotely outright:
    iCloud: Erase your device
    http://support.apple.com/kb/PH2701
    You should also take a look at this article for additional info on what to do about this situation:
    If your iPhone, iPad, or iPod touch is lost or stolen
    http://support.apple.com/kb/HT5668
    Thank you for using Apple Support Communities.
    Take care,
    Sterling

  • HT5887 Hi,Latest games whichever available in itunes or public domain are not supprting to my IPOD tocuch. Please kindly help me on this

    Hi Everyone,
    I am trying to add games, songs, apps in my IPOD touch but it always saying that it not support. I have downloaded the latest ITUNES then downloaded lot of games,songs. When i try to synchronize all this to my ipod, it is saying that version will support. Please kindly help me on this.
    Thanks,
    Rama Mohan Raju R.

    I suspect you have a 2G iPod. Those can only go to iOS 4.2.1.
    Identifying iPod models
    iPod touch (3rd generation)
    iPod touch (3rd generation) features a 3.5-inch (diagonal) widescreen multi-touch display and 32 GB or 64 GB flash drive. You can browse the web with Safari and watch YouTube videos with Wi-Fi. You can also search, preview, and buy songs from the iTunes Wi-Fi Music Store on iPod touch.
    The iPod touch (3rd generation) can be distinguished from iPod touch (2nd generation) by looking at the back of the device. In the text below the engraving, look for the model number. iPod touch (2nd generation) is model A1288, and iPod touch (3rd generation) is model A1318.
    Many apps not requires a higher iOS version
    To more easily find compatible apps:
    iOSSearch - search the iTunes store for compatible apps.
    Apple Club - filter apps by iOS version.
    Starting when iOS 7 was releases, Apple now allows downloading the last compatible version of some apps (iOS 4.2.1 and later only)
    App Store: Downloading Older Versions of Apps on iOS - Apple Club
    App Store: Install the latest compatible version of an app
    You first have to download the non-compatible version on your computer. Then when you try to purchase the version on your iPod you will be offered a compatible version if one exists.

  • Kindly help me with this checkbox issue

    Hi all,
    Firstly I would like t o thank this very helpful forum.I have one more question regarding checkboxes.
    /*courses.jsp*/ In my courses.jsp which connects to an MS Access database I have something like this...
    <INPUT TYPE=CHECKBOX NAME="COURSES" VALUE="rs.getString("course")"><%out.print(rs.getString("course"));%></td>/*courses.jsp*/
    This is coming from the database.
    In my servlet code i have this in the doPost method.
    /*CheckBoxServlet*/ PS : This servlet is not connected to the database..
    String checkbox[] = request.getParameterValues("COURSES");
              int counter = checkbox.length;
              System.out.println("Number of checkboxes checked " + counter);
              if (checkbox !=null){
                   for (int i = 0; i < checkbox.length; i++) {
                   System.out.println("Checkbox values "+ checkbox);
         } else {
                   System.out.println("none selected");
    /*CheckBoxServlet*/
    /* OUTPUT */
    I have checked 5 check boxes
    Checkbox values rs.getString(
    Checkbox values rs.getString(
    Checkbox values rs.getString(
    Checkbox values rs.getString(
    Checkbox values rs.getString(
    /*OUTPUT*/
    My question is why is it not printing out the value in rs.getString()????.
    It would be great if this forum helps me in the right direction.Let me know how i can go about doing this.
    I hope i have explained my question correctly.If you have any further questions kindly ask.
    Thanking every one in adavance
    AS

    your mixing html and java code
    <INPUT TYPE=CHECKBOX NAME="COURSES"
    VALUE="rs.getString("course")"><%out.print(rs.getStrin
    g("course"));%></td>based on this it should be
    <INPUT TYPE=CHECKBOX NAME="COURSES"
    VALUE="<%out.print(rs.getString("course"));%>)"><%out.
    print(rs.getString("course"));%></td>
    Hi again,
    Thanks for the reply.
    If I give this
    <INPUT TYPE=CHECKBOX NAME="COURSES" VALUE="<%out.print(rs.getString("course"));%>"><%out.print(rs.getString("course"));%>This is the error message i get
    javax.servlet.ServletException: No data found
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.courses_jsp._jspService(courses_jsp.java:243)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         servlet.AdminValidationServlet.doGet(AdminValidationServlet.java:78)
         servlet.AdminValidationServlet.doPost(AdminValidationServlet.java:93)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.sql.SQLException: No data found
         sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7139)
         sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3908)
         sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:5702)
         sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:356)
         sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:413)
         org.apache.jsp.courses_jsp._jspService(courses_jsp.java:106)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         servlet.AdminValidationServlet.doGet(AdminValidationServlet.java:78)
         servlet.AdminValidationServlet.doPost(AdminValidationServlet.java:93)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)What could be the reason for this.It would be great if you can help me out.
    TIA
    AS

  • Kindly help me with this Struts 1.0 and Ibatis issue

    Hi All,
    Hoping that this question will get posted.I am working on the example provided by http://www.reumann.net for the Ibatis.
    I am using tomcat 5.0.28 , eclipse 3.0 and Java 1.4.2.I get the index page of the application
    Once I click either of the links I get the following error on the browser.Http 500 eoor
    "javax.servlet.ServletException: Cannot find bean under name departments
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.employeeForm_jsp._jspService(employeeForm_jsp.java:154)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
         org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         org.apache.struts.action.ActionServlet.process(ActionServlet.java:1480)
         org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:506)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)"
    It would be great if someone helps me out in detail as to what is to be done to get this application up and running.I am trying to use MS access database.
    Many thanks in advance.
    Thanking you
    AS

    AS,
    I'll answer you here as I did on TSS. You need to pass a bean called "departments" in whichever scope you used in your jsp page.
    As for a detailed explanation of how to integrate MSAccess, you'll probably need to read a few tutorials online. Ask again when you have specific questions that aren't answered by them.
    sv

  • I'm using 3gs, after updating the OS with 6.1.3 version lost all my photo albums unable to retrieve through Itunes kindly help me in this regard.

    Hi There,
    A month ago I had 3gs with 4.1 OS version and I synced all my photo albums from my old laptop as I have planned to sell it off.
    I sold my old laptop and accidentally kids at my home have pressed reset button and my phone got locked, now I got my phone permanently unlocked with a vendor and updated my OS to 6.1.3 version, thinking that my photo can synced again when I connect to Itunes, I bought my new laptop installed Itunes authorised it, it was able to restore my camera roll pics but not my album.
    Please help me in restoring my lost album.
    Thanking in Advance.

    I'm sorry, but unless you hace a backup of your pics somewhere, they are gone. Photos synced to your phone are not part of an iPhone backup, & the photo sync is one-way: Computer to Phone. When you synced to a different computer, these photos were erased from your phone...by design, iPhone syncs iTunes content with one computer at a time.
    Sorry, there is no way to recover this data.

  • Plz help in solving this servlet error...

    Hi,
    I've a webapplication in struts. As soon as i submit the login form i'm getting this error :-
    WARN [RequestProcessor] Unhandled Exception thrown: class java.lang.NullPointerException
    08:58:10,071 ERROR [[action]] Servlet.service() for servlet action threw exception
    java.lang.NullPointerException
         at com.java.action.LoginAction.doLogin(LoginAction.java:44)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:274)
         at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
         at java.lang.Thread.run(Unknown Source)
    AND,
    the my code at line 44(at com.java.action.LoginAction.doLogin(LoginAction.java:44)) is :-
    userVO.setStrUserId((String)frmLogin.get("userid"));
    at this line, i'm just trying to set the userid entered frm the login page.m i missing some settings or any jar files. I'm using JBoss4.0.2(AS), MyEclipse6.0(IDE), and struts1.1

    Thanks for the replies frnds. As ganesh pointed, the mistake was from my side and very very silly, in LoginAction.java inspite of creating an instance for UserVO, i made it null(UserVO userVO = null;). After changing, things started working fine. Thanx again for the reply :-)
    Edited by: garv on Jun 29, 2008 11:26 PM

  • Help me with this servlet....

    Hi guys,
    excuse me if i repeat a my old post,but now i have more clear ideas about problems.
    I've developed an authorization filter in my jsf application that when a page is loaded try to find a visit object in the session,if it doesn't find show login page.
    It's simple as concept,but in my application my filter doesn't start!
    Can you help me?
    My filter is very simple
    package giu;
    import java.io.IOException;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class AuthorizationFilter implements Filter
      FilterConfig config = null;
      ServletContext servletContext = null;
      public AuthorizationFilter()
      public void init(FilterConfig filterConfig) throws ServletException
        config = filterConfig;
        servletContext = config.getServletContext();
      public void doFilter(ServletRequest request, ServletResponse response,
                           FilterChain chain) throws IOException, ServletException
        Utils.log(servletContext, "Inside the filter");
        HttpServletRequest httpRequest = (HttpServletRequest)request;
        HttpServletResponse httpResponse = (HttpServletResponse)response;
        HttpSession session = httpRequest.getSession();
        String requestPath = httpRequest.getPathInfo();
        Visit visit = (Visit)session.getAttribute("visit");
        if (visit == null)
          session.setAttribute("originalTreeId", httpRequest.getPathInfo());
          Utils.log(servletContext, "redirecting to " + httpRequest.getContextPath() +
                    "/faces/Login.jsp");
          httpResponse.sendRedirect(httpRequest.getContextPath() +
                    "/faces/Login.jsp");
        else
          session.removeAttribute("originalTreeId");
          String role = visit.getUser().getRole();    }
        Utils.log(servletContext, "Exiting the filter");
      public void destroy()
    }my Login.jsp and index.jsp pages are in WebContent folder,while the other pages are in the Webcontent/protected.
    What i miss?
    Here is my web.xml, i thing the error is here,it's how filter doesn't intercept the requests...can you help me?
    <?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>
    <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>client</param-value>
    </context-param>
    <filter>
      <filter-name>AuthorizationFilter</filter-name>
      <filter-class>giu.AuthorizationFilter</filter-class>
    </filter>
    <filter-mapping>
      <filter-name>AuthorizationFilter</filter-name>
      <url-pattern>/faces/protected/*</url-pattern>
    </filter-mapping>
    <servlet>
      <servlet-name>FacesServlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
      <servlet-name>FacesServlet</servlet-name>
      <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
      <servlet-name>FacesServlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
      <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <resource-ref>
      <description>DB Connection</description>
      <res-ref-name>jdbc/nomedb</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>and index.jsp
    <jsp:forward page="/Login.jsf"/>

    Thanks....
    i've moved all the jsp pages in /pages/protected except Login.
    I've added to web.xml
    <filter-mapping>
    <filter-name>AuthorizationFilter</filter-name>
    <url-pattern>/pages/protected/*</url-pattern>
    </filter-mapping>
    and so filter acts,but when i logged in i see Menu,i select a choice and all the next pages are ever blank!!
    I stop the filter and each page compares!
    Why?
    Can you help me?
    A second question is:
    what does mean an url like /faces/*?
    Each .jsf requests?Or faces is seen as a folder ?
    Thanks very much

  • HT5934 Hi I am using iPhone 5 and not able to download ios7 update kindly help me in this regards

    Ho am using I phone 5. Not able to upgrade it to ios7

    Are you trying to update using a computer and iTunes, or are you trying to update using WiFi?

  • 0.6, with same problem as i am during installation continues beep on mac which unusual and it tooks longer time and didnt reboot the system. kindly help

    Continue beep while installing leopard, kindly help to fix this problem and it took many hours only gray screen and apple logo it didn't proceed the reboot

    More information required as Allan posted. 
    Beeping match any of these?
    Startup Tones

Maybe you are looking for

  • Excel stopped working

    In my labview program, I open, edit, and close multiple excel sheet one at a time.  It used to work, but I am getting a -41106 error.  It said that the possible reason is "Report Generation Toolkit: Microsoft Word or Excel did not open.  Make sure Mi

  • IPod nano will not charge when plugged into a computer, or power adapter

    This is an 8gb iPod nano 4th gen. Today, I was playing it on the stereo, and it ran out of juice, so i plugged it into my computer to charge. It would flash the "Connect to Power" screen, then turn off, then turn on, showing the apple logo, a few sec

  • Photos not appearing on FB from my iphone or ipad

    I uploaded 41 photos from my iphone to my home computer then shared them on Facebook.  I can only see 5 of them when I go on FB from my ipad or iphone?  They are all there when I access FB on my home computer but not when I log on to FB from my ipad

  • ALV Classic - How to extract the selection long text of TYPE LVC_T_FCAT?

    DATA: e_dyntab_tb  TYPE lvc_t_fcat,           e_dyntab_wa TYPE lvc_s_fcat,           t_line_reftab   TYPE REF   TO data. *Populate ALV fiels of TYPE LVC_T_FCAT MOVE: c_matnr      TO e_dyntab_wa-fieldname. MOVE: c_material   TO e_dyntab_wa-scrtext_l.

  • Changing SC status

    Hi Experts, I  try to change the status of shopping carts. When we uplaod packagings or toolings in our specific system, shopping carts are created with the status "Held". I want to change this rule. I want to change the status to "Approved". I've tr