Servlet does not refresh in browser

Hi,
If I change a Servlet code, re-compile it and Refresh the browser (Firefox), it does not refresh. I can only get it to refresh if I re-start Tomcat (v 5.5.4).
Is there a workaround for this please?
I put the lines:
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("max-age", 0);
response.setDateHeader("Expires", 0);
at the top of my doGet method and this does not work.
Thanks,
Hal.

Hi,
For classes, you can set the reloadable parameter in your application configuration file (in the $CATALINA_HOME/conf/[enginename]/[hostname]/ directory)
Set it to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html
For JSPs, you can configure Jasper (in $CATALINA_BASE/conf/web.xml file) and use the reloading parameter.
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html

Similar Messages

  • Javax.servlet does not exit

    hello all,
    i m new and have recently started using java, servlets, jsp with netbeans and Tomcat.
    There are some servlet examples in Tomcat5.5\webapps\servlets-examples\WEB-INF\classes\...
    Using the //localhost:8080/....... , i can easily get these servlets working in the browser.
    When i opened one of the java file say: HelloWorldExample.java in Netbeans, there area lot of red circles with exclamation mark in it.
    it says: "package javax.servlet does not exist"
    in this line: import javax.servlet.*;
    i am surprised why such errors are there and with such errors also the program runs...i want to get rid of such red circles and the error it is showing.
    I have jdk1.6.0_10 , jre1.6.0_05 , Netbeans IDE 6.0.1 , Tomcat 5.5 installed in my Windows Vista OS
    i have set my classpath as
    .;C:\root\jakarta-tomcat-5.5.9\common\lib\servlet-api.jar;C:\root\jakarta-tomcat-5.5.9\common\lib\jsp-api.jar;
    JAVA_HOME : C:\Program Files\Java\jdk1.6.0_10
    any help is appreciated....
    Thank you.
    Edited by: kuchu on Jun 26, 2009 12:00 PM

    The servlet API is included in the application server implementation which you're going to use (in this case Tomcat). You need to associate the application server with the Netbeans project. Check the project properties.
    I cannot tell the detailed steps how to do it in Netbeans as I already uninstalled it after 5 minutes of trying some years ago, but in Eclipse you can select and add the application server during the 'create dynamic web project' wizard. It is smart enough to include the appserver's libraries in the project's build path. From what I heard and read about Netbeans is that it is also able to do so.

  • Hyperlinked JSP Page does not refresh contents

    I have a very typical problem.
    In my application whenever I call a jsp page using hyperlink without any querystring attached to it the page called does not refresh. However when I press refresh on the browser it does refresh the contents. Basically in this page I am using some session variables to fetch data. So I do not call the page by passing querystring instead set the attributes of session variables and then the page is called as a hyperlink.
    However if I call the same page using submit the values are refreshed.
    Help on this urgently will be appreciated.
    Thanks
    Manish

    Just set 'no-cache' option for the jsp page and test it. It should work. only you need to do is
    response.setDateHeader("Expires",0);
         response.setHeader("Pragma","no-cache");
         if(request.getProtocol().equals("HTTP/1.1")) {
              response.setHeader("Cache-Control","no-cache");
    have fun!!
    ---rajsekhar

  • Flash Animation Does Not Refresh

    I've created a Captivate demo that has an animated flash
    segment in the middle of it. This demo was developed for a trade
    show and was designed to loop so it can run automatically
    throughout the day. Plays great through the first pass. Problem is,
    after it has run once, the flash animation does not refresh and
    play. Only the blank slides are shown. Same thing happens if you
    play the demo then try to rewind to play one of the animated
    sequences.
    If I hit F5 to refresh the browser it plays. How can I get
    this animation file to refresh automatically so it does not require
    human intervention to refresh?
    Thanks!

    Do you have your last side set to go to slide 1 as your way
    of repeating? Try setting it to open other project and just point
    it at itself, this will make it reopen the project from scratch
    (set it to open in the same window). It will have to reload of
    course, but should work as designed.

  • BO XIR3.1 CMC does not refresh automatically

    Inside CMC, there are various rights set to different groups (for e.g. the rights for "Administrators" are different from the rights of "Everyone"). When I click on one of the folders and check their user security, the other folder shows the same rights as of the first one. It doesn't change automatically to the rights of the next folder. I guess it has to do with automatic refresh.
    I have noticed that CMC does not refresh pages properly. For example, I was checking the Access Rights set on a Public Folder, it shows all rights are granted for "Administrators". But, when I switch to "Everyone", it still shows all rights are granted, which is incorrect because they should be Unassigned.
    I have to log off CMC, clear the cache/cookies in web browser and then Login again in order to see the correct settings.
    That means, every time after I view the settings for an object, I have log out, clear cache, and re-login. Otherwise I will see incorrect information for the next one. Changing and configuring User Security settings is even a bigger challenge because I am not sure whether the values displayed on the screen are correct and what will the system remember.

    if restoring the ipad to factory default don't fix it I would say it's
    an hardware issue and take it in for service

  • Advanced Table does not refresh after database level action

    Hi,
    I have a page which has an advanced table. I update the advanced table from the page do some validations, update some DB level columns(also part of advanced table) and see that the changes are saved to the DB but the advanced table does not show the updates done at the DB level.
    I tried clearing the VO Cache and re-executing the VO but still it does not refresh the Advanced table data.
    This is very critical requirement for the client, any inputs will be greatly appreciated.
    Thanks a lot in Advance.
    Here is the code snippet from my CO's processRequest:
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAAdvancedTableBean tblbean = (OAAdvancedTableBean)webBean.findChildRecursive("recasttable");
    if(tblbean!=null)
    tblbean.setRendered(true);
    OAApplicationModule tblam = (OAApplicationModule)am.findApplicationModule("RecastLineAM1");
    tblam.invokeMethod("initQuery");
    tblbean.getTableData();
    Here is my AM - initQuery() code:
    public void initQuery()
    //clearVOCaches("RecastLineEO",true);
    clearVOCaches(null,true);
    getRecastLineVO1().init();
    Here is the VO - init() code:
    public void init()
    System.out.println("****************************executing...");
    OADBTransaction tx = (OADBTransaction) getApplicationModule().getTransaction();
    if (tx.getTransientValue("RECAST_ID") !=null)
    Number recastId = (Number) tx.getTransientValue("RECAST_ID");
    System.out.println("recastId: "+ recastId);
    setWhereClause("RECAST_HDR_ID = :1");
    setWhereClauseParams(null); // Always reset
    setWhereClauseParam(0, recastId);
    executeQuery();
    }

    hi,
    This is how I am calling a DB package. the package does updates on the table. once done I am issueing a commit and requerying the data, however the vo is not getting refreshed.... Can someone point out what am I missing... why is the VO not getting refreshed....
    This is very critical...
    Thanks
    Srini
    public void validateRecast(String respKey)
    OADBTransaction tx = (OADBTransaction)getApplicationModule().getTransaction();
    Number recastId = (Number) tx.getTransientValue("RECAST_ID");
    System.out.println("*********************validateRecast().RecastId: " + recastId);
    OracleCallableStatement ocs = null;
    Connection conn = tx.getJdbcConnection();
    String strOut="", strErr="";
    Number respId = null;
    try
    respId = new Number(respKey);
    catch(Exception e)
    throw new OAException("Invalid Responsibility");
    String stmt = "BEGIN " +
    "GE_RECAST_UTILS_PKG.validate_recast(:1,:2,:3,:4); " +
    "END;";
    try
    ocs = (OracleCallableStatement)conn.prepareCall(stmt);
    ocs.setNUMBER(1,recastId);
    ocs.setNUMBER(2,respId);
    ocs.registerOutParameter(3,OracleTypes.VARCHAR);
    ocs.registerOutParameter(4,OracleTypes.VARCHAR);
    ocs.execute();
    strOut = ocs.getString(3);
    strErr = ocs.getString(4);
    ocs.close();
    System.out.println("Returned with: " + strOut);
    if(strOut.equalsIgnoreCase("ERROR"))
    //throw new OAException(strErr);
    tx.putTransientValue("ERROR",strErr);
    tx.commit();
    getApplicationModule().clearVOCaches("RecastLineEO",true);
    RecastLineVOImpl lineVo = (RecastLineVOImpl)getApplicationModule().findViewObject("RecastLineVO1");
    lineVo.init();
    System.out.println("===============RecastLnId: " +lineVo.first().getAttribute("RecastLnId"));
    System.out.println("===============Product Line: " +lineVo.first().getAttribute("ProductLine"));
    catch(SQLException e)
    tx.rollback();
    if(ocs!=null)
    try
    ocs.close();
    }catch(SQLException e1)
    throw OAException.wrapperException(e1);
    throw OAException.wrapperException(e);
    }

  • Discoverer 10.1.2 does not refresh new added column

    Hello,
    I need help to add a new item to EUL Business Area folder for a new added column in the database table.
    When I refresh the folder in the BA EUL, the result shows no difference between the folder and the underlying table in the database; however, when I quey the table in the database, a new column is there. The refresh of the folder in the Discoverer Admin tool cannot find the newly added column. Weird!! The first time saw this problem.
    Could someone shine some light on it? Would be really appreciate it!
    Ping

    I have a slightly different problem and can't solve it! When I refresh the EUL, the result shows the differences between the folder and the underlying tables in the database. However, it does not refresh the EUL in Discoverer Administrator 10g. Nothing happens! When I try to refresh again, the same list is shown... Does anyone know what could be happening?
    Thanks

  • Package javax.servlet does not exist - settings appear to be correct

    laugh as I write this post...it's hardly a "new topic."...but everything seems set just as it should be...
    Okay...I'm a seasoned programmer in every language but JAVA. Here's the issue...every time I try to use the Core Servlets book/website by Marty Hall and Larry Brown I get hung up on the packages. This time, I downloaded and followed step by step what the website said to do...it was even preconfigured for me! Alas...I am getting the following compliation errors on a "simple packagless" program with NetBeans:
    Compiling 1 source file to C:\Servlets+JSP\HelloServlet\build\classes
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:2: package javax.servlet does not exist
    import javax.servlet.*;
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:3: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:13: cannot find symbol
    symbol: class HttpServlet
    public class HelloServlet extends HttpServlet {
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:14: cannot find symbol
    symbol : class HttpServletRequest
    location: class HelloServlet
    public void doGet(HttpServletRequest request,
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:15: cannot find symbol
    symbol : class HttpServletResponse
    location: class HelloServlet
    HttpServletResponse response)
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:16: cannot find symbol
    symbol : class ServletException
    location: class HelloServlet
    throws ServletException, IOException {
    6 errors
    BUILD FAILED (total time: 0 seconds)
    These are my environment settings (note that the JAVAX package is located under the src folder in Java)
    Catalina Home:
    C:\apache-tomcat-6.0.10
    CLASSPATH:
    C:\apache-tomcat-6.0.10\lib\servlet-api.jar;
    C:\apache-tomcat-6.0.10\lib\jsp-api.jar;
    C:\apache-tomcat-6.0.10\lib\el-api.jar;
    C:\Servlets+JSP;..;..\..;
    C:\Program Files\Java\jdk1.6.0_03\src
    JAVA_HOME
    C:\Program Files\Java\jdk1.6.0_03
    Path:
    C:\Program Files\Java\jdk1.6.0_03\bin;%PATH%
    Any ideas (excluding the one that maybe I should let my hair grow out, put on some tackey shorts and sandles and start palying an instrument in the streets of Austin for living?)

    cabkats wrote:
    You are then suggesting that I make the corrections directly to the files in apache using notepad instead of using the envir. variables?No I am not suggesting that. I am suggesting that you need to read the documentation about the product(s) and set them up the way they require, rather than blindly think that the CLASSPATH environment variable is some magical entity.
    I will try this, but I was hoping that since my IDE auto configured (with exception to java_home) that I would not have to do this. I wil give it try....thanks for the suggestion.See, you're using an IDE. Like I mentioned, IDEs do not use the CLASSPATH environment variable. You need to set up your project in your IDE in such a way that it knows what the dependent jars are. I'm sure there's a way to add jars to your project's dependencies.

  • Management Studio 2008 does not refresh after table create / alter

    hello
    Management Studio 2008 does not refresh after table create / alter, why?
    f5 / refresh button does not work in "Object Explorer".... i always need the restart the whole application to see any changes, this is strange...
    regards, jan

    Hi jm,
    I’m writing to follow up with you on this post. Was the problem resolved after performing Vishal ‘s steps? If you are satisfied with our solution, I’d like to mark this issue as "Answered". Please also feel free to unmark the issue, with any new findings
    or concerns you may have.
    Thanks,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • When I try to open my Yahoo mail in safari, I get a message which states:" In order to use Yahoo mail, please turn Private Browsing off. Please go to Settings Safari Private Browsing, and turn off" The problem is my ipad does not a Private Browsing switch

    When I try to open my Yahoo mail in safari, I get a message which states:" In order to use Yahoo mail, please turn Private Browsing off. Please go to Settings>Safari>Private Browsing, and turn off" The problem is, my ipad does not a Private Browsing switchat this location.

    With iOS 7 on the iPad, you turn Private  Browsing on and off by tapping the URL field.  The screen that  opens up has your bookmarks on it.  In the bottom left corner is a hot button marked 'PRIVATE'.  Tap on the word 'PRIVATE' to turn private browsing on or off.  Yeah, there aren't any instructions anywhere that I can find to do this, and if you follow Yahoo's instructions, they don't work.  This doesn't happen with the previous Apple OS, and you can restore your iPad to the older OS. 

  • Adobe Reader X 10.1.1: PDF does not display in browser

    Hello,
    If I click on a link to a PDF-file, this PDF-file does not display in browser eventhough I have checked "Display PDF in browser" (Preferences ==> Internet ==> Web Browser Options) but instead Adobe Reader X opens the PDF-file outside browser. What is wrong?
    Thank you for your help.

    I solved the problem. I used Internet Explorer, 64-bit. If I use Internet Explorer 32-bit the PDF-file displays in browser. If I use Internet Explorer 64-bit Adobe Reader X opens the PDF-file outside browser.

  • ANT script genrated error: package javax.servlet does not exist

    Hi there,
    I am running ANT and confronted this message:
        [javac] Compiling 1 source file to C:\eclipseProjects\tomcat_test
        [javac] C:\eclipseProjects\tomcat_test\WEB-INF\src\WebTest.java:4: package javax.servlet does not exist
        [javac] import javax.servlet.ServletException;
        [javac] ^I googled around and found this solution:
    servlet-api.jar is the jarfile that contains javax.servlet.ServletException and javax.servlet.http.* which are imported by WebTest.java and must therefore be found in the classpath. If javac doesn't find this jar (or the javax.servlet packages), it will say (or shout, depending on my and javac's mood): [the error message]
    well...I set in the classpath the location of the servlet-api.jar
    (found at: C:\Tomcat\common\lib)
    I set it with the environment variable (windows xp)
    Just as it's shown here: http://www.cs.usask.ca/~wew036/latex/env-env.jpg
    NOTHING :-(
    could anyone assist, thanks

    Hi..seems u r new to J2ee.. dont worry its a very small problem:
    Here is the solution.. yes u have to edit the environment variables:..
    I am using J2EE sdk 1.4 and running on xp
    This is the classpath setting:
    C:\Sun\AppServer\lib\j2ee.jar;
    This is the PATH setting
    C:\Sun\AppServer\bin;
    Good Luck :)

  • Blank error message with ? appears and PDF does not open in Browser (IE11) when clicking link to open pdf. PC - IE11 Acrobat 9.0

    Blank error message with ? appears and PDF does not open in Browser (IE11) when clicking link to open pdf. PC - IE11 Acrobat 9.0
    Cannot access in browser PDF files unless blank box is closed and then website address is clicked on again in browser address bar and page reloaded.
    Uninstalled Acrobat 9, reinstalled, still same problem.
    Help please!

    Yes I can it only happens in the browser..
    I reinstalled Windows on my machine and started over a couple of weeks ago.
    When my desktop started up I didn’t have Acrobat installed and clicked on a pdf file and the open with xxx dialogue box came open.
    I chose a different program as Acrobat wasn’t installed yet so it associated pdf files with another program.
    Later Installed Acrobat and couldn’t associate the pdf file with acrobat so I went into Folder Options and manually associated PDF files with Acrobat.
    Ever since then I get the error when something is downloaded and opened in the browser.
    Works fine everywhere else and when I cancel the blank error, highlight the web address and press enter to reload it works 90% of the time.
    Not sure what to do..

  • It seems mapproxy servlet does not work in 11.1.1.2

    Dear Masters,
    I used mapproxy?rtarget= to access mapviewer in JDeveloper 11.1.1.1 and everything was OK but when I switched to 11.1.1.2 mapproxy servlet does not return anything.
    Is there any changes about mapproxy servlet?
    Regards.

    Hi,
    in my web.xml file I see
    <servlet-mapping>
    <servlet-name>MapProxyServlet</servlet-name>
    <url-pattern>/mapproxy/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    Frank

  • ATMTag.java:5: package javax.servlet does not exist

    My j2ee jdk1.4.2 is not supporting javx package.
    i already set all pathh and class path.
    anybody can help me.
    details are given below ::
    C:\AVA\J2EE Programs\JSP\JSPCustomTag>javac ATMTag.java
    ATMTag.java:5: package javax.servlet does not exist
    import javax.servlet.*;
    ^<br>
    ATMTag.java:6: package javax.servlet.http does not exist
    <br>
    import javax.servlet.http.*;
    <br>
    ATMTag.java:18: cannot resolve symbol
    symbol : class TagSupport
    location: class ATMTag
    public class ATMTag extends TagSupport{
    <br> ^
    ATMTag.java:29: cannot resolve symbol
    symbol : class JspTagException
    location: class ATMTag
    public int doStartTag() throws JspTagException{
    <br> ^
    ATMTag.java:31: cannot resolve symbol
    symbol : class JspWriter
    location: class ATMTag
    <br> JspWriter out =pageContext.getOut();
    ^
    ATMTag.java:31: cannot resolve symbol
    symbol : variable pageContext
    location: class ATMTag
    <br> JspWriter out =pageContext.getOut();
    ^
    ATMTag.java:56: cannot resolve symbol
    symbol : variable pageContext
    location: class ATMTag
    pageContext.getOut().write(str);
    <br> ^
    ATMTag.java:60: cannot resolve symbol
    symbol : variable EVAL_PAGE
    location: class ATMTag
    return EVAL_PAGE;
    ^
    8 errors

    When compiling servlets etc, you need to include in your classpath a jar file with all the javax.* classes defined in it.
    For Tomcat this is called servlet.jar and is in (I think) [TOMCAT_HOME]/shared/lib or /common/lib
    For J2EE 1.4 Server, the jar is [J2EE_HOME]/lib/j2ee.jar
    Where the _HOME directory is the directory where you installed J2EE.
    Include this jar file in your classpath when compiling.
    Good luck,
    evnafets

Maybe you are looking for

  • ASA 5505 initial build - Failed to locate egress interface (Please help :-) )

    Hi, I have just purchased a ASA 5505 and have completed the initial setup via the wizard.  I am currently unable to access services on the outside of the ASA.  The error: 'Failed to locate egress interface for UDP from inside'....  appears when ever

  • Adding a single file to iPod Nano?

    Since I downloaded the latest version of iTunes, things don't make a lot of sense. I can manually manage my music, but I can't view my music list and the only way I can get music onto my iPod is to add everything in my library. Is there any way to av

  • How to test the rule if multiline container is passing to the task?

    Hi Experts,                   I am working on leave workflow. I have to get the approvers based on no of days of leave and leave type. I am getting these details in ITEMS_TAB internal table. I am passing this table to a rule. Now my problem is when I

  • 1 Minute Startup on 3G iPhone

    I just bought a used iPhone 3G. I takes a long time to shut down, and starting up takes literally about 1 minute. Is this normal? If I restore it to original (through iTunes), would it be much faster? Thanks for answering my noob questions!

  • What did iOS 8 do to my photo stream?

    I upgraded my iPhone 5 to iOS 8 from iOS7.1.2.  I do not see my photo stream in the Photos.app.  What happened?