struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Houbie - ABSIS-GROUP <>
Subject RE: page do not refresh
Date Tue, 12 Feb 2002 10:37:37 GMT
In fact, the value in the session is ok, but it seems that the proxy is
caching a lot, because the url inn the browser is the Action servlet name
instead of JSP page, so the url /Online/ is always the
same and the Actionforward to the jsp is transparent. How can I force the
proxy to regenerate the jsp page, here is my code

public class SelectSiteAction extends org.apache.struts.action.Action {

    /** Creates new LogonAction */
    public SelectSiteAction() {

    public org.apache.struts.action.ActionForward
perform(org.apache.struts.action.ActionMapping mapping,
org.apache.struts.action.ActionForm form,
javax.servlet.http.HttpServletRequest request ,
javax.servlet.http.HttpServletResponse response) throws,
javax.servlet.ServletException {
	// Extract attributes we will need
	Locale locale = getLocale(request);
	MessageResources messages = getResources();

	// Validate the request parameters specified by the user
	HttpSession session = request.getSession();
	ActionErrors errors = new ActionErrors();
        System.out.println("SelectSiteAction [Start]");

        String strCellIDParam = request.getParameter("CellID");
        System.out.println("CellID received in URL " + strCellIDParam);

        // Report any errors we have discovered back to the original form

        // Is there a currently logged on user?
	reqReoUser reoUser = (reqReoUser) session.getAttribute("User");
	if (reoUser  == null) {
            if (servlet.getDebug() >= 1)
                servlet.log(" User is not logged on in session "
                            + session.getId());
	    return (servlet.findForward("logon"));
        // Get Datasource configured from struts-config.xml

        DataSource dataSource = (DataSource)
        java.sql.Connection conn = null;
            // Get a connection to database from the Generic Pool
            conn = dataSource.getConnection();
            // Put a session value specifying the Site ID on which every
report will work
             if (session.getAttribute("Site") != null)
            session.setAttribute("Site", strCellIDParam);
            System.out.println("Site session value");
            // Put a request attribute with record of the Site
            if (session.getAttribute("SiteCard") != null)

            session.setAttribute("SiteCard", reqSiteCard.findByCellID(conn,

            DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT,
            session.setAttribute("Today", df.format(new Date()));

        catch (SQLException sqle)
//            servlet.log(sqle);
            session.setAttribute("SQLError", sqle);
            return (mapping.findForward("failure"));
            catch (SQLException sqle)
            conn = null;


        System.out.println("SelectSiteAction [End]");
        return (mapping.findForward("ShowCard"));
        // Forward control to the specified success URI


-----Original Message-----
From: Max Cooper []
Sent: mardi 12 février 2002 11:19
To: Struts Users Mailing List
Subject: Re: page do not refresh


If the query string is different between the two requests, it is not likely
to be a page caching problem. The query string is part of the URL, so things
that cache pages by URL will see the two requests as two different URLs.

Try using the request scope, rather than the session scope, for passing the
object from your Action to the JSP page. This is preferable unless you need
to keep the value in the session for some other reason. However, if it does
need to be in the session, it doesn't seem like the action is replacing the
value in the session and needs further review (perhaps you could post the
code that puts/gets the value in the session).


----- Original Message -----
From: "Frédéric Houbie - ABSIS-GROUP" <>
To: "Struts-User" <>
Sent: Tuesday, February 12, 2002 1:34 AM
Subject: page do not refresh

> Hi,
> I have a problem in my struts application, I have a page that call an
> servlet which store a value received in url  in session, than forward to a
> jsp page. If I this action servlet is called with another value in url,
> jsp page do not change, it seems to come from the proxy. I put expire meta
> tag in jsp, but no changes, the url in the adress bar is always the .do
> action. Does it means that I must make the action servlet expire ?
> I don't understand the process,
> thanks for help
> Frédéric houbie
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message