tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Wright" <>
Subject Re: Need Solution to authenticated webpages and forms
Date Tue, 04 May 2004 00:57:45 GMT
I'm not 100% sure this is going to help you much but it may be worthy of
consideration if you're going to be implementing this kind of thing often.

Have you looked at the Jakarta STRUTS framework? There's a whole lot of
time-saving functionality built in, especially with regard to forms:
validation, repopulation of form fields etc. In your case you could store
the values the client enters in a bean.
Store the bean in the client's session and have the JSP page with your form
check for the existence of the bean attribute when its invoked. As a work
around to the client clicking the browsers back button add some meta tags to
prevent the page from being cached.


----- Original Message -----
From: "Pleasant, Tracy" <>
To: <>
Sent: Tuesday, May 04, 2004 9:43 AM
Subject: Need Solution to authenticated webpages and forms

>  I was able to set up basic authentication through tomcat for a directory
> my webapps/myapp directory contains file that are open for everyone
> my webapps/myapp/admin directory contrains protected pages
> When I use forms in the webapps/myapp directory, hitting the back button
on the browser(internet explorer) after submit saves the users data.
> However, when I use a form in the webapps/myapp/admin directory, hitting
back button does not save anything.
> I tried it with a very simple form
> <form method=post action=test2.jsp>
> <input type=text>
> <input type=submit value=Go>
> </form>
> and it didn't work.
> The form that I am using has a lot of drop down boxes (basic numbers which
I created functions with javascript). However, if the user hits submit and
comes to a confirmation page then they will have to go back to the form and
they wont' be able to, all the data will be lost... unless I create some
kind of "back" button but not sure how to handle that with the javascript
population of the drop down since javascript and jsp runs on client/server
two different places.
> Any solutions for this type of thing?
> I opened a bug, but was pointed to another bug and asked to ask this on
the group emails
> The other bug said to do this but I don't know where this stuff is suppose
to go.  Should it be in the webapps/myapp/admin section???  Should I call it
admin.xml ?
> I tried:
> <Context path="/admin" docBase="admin">
> <Valve className="org.apache.catalina.authenticator.FormAuthenticator"
> disableProxyCaching="false" />
> </Context>
>  but that didn't seem to work at all..
> Please help because.. I'm also a newbie so please don't speak to
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message