tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jones, Stephen" <sjo...@rational.com>
Subject RE: best way to handle Servlets+JSPs+multiple Frames?
Date Wed, 21 Feb 2001 17:51:41 GMT
In our product, we use forms to POST user input data. We usually send the
input to another JSP page, but I don't see why this would not work for a
servlet's doPost(HttpServletRequest, HttpServletResponse) method.

e.g.:
	<form name="ReqAttMod" id="ReqAttMod" method="POST"
action="UserMod_Ctl.jsp" target="_top">
		<% /* form stuff here, buttons, textfields, etc */ %>
	</form>

When the servlet has made its controller-decisions, it then performs a
URL-redirect to the new HTML frameset desired (sURL), according to biz
logic, e.g.:

	response.setStatus(HttpServletResponse.SC_MOVED_TEMPORARILY);
	response.setHeader("Location", sURL);

(this is a cookie-safe redirect)

I'm sure there are other ways, as well.
Steve

-----Original Message-----
From: Sebastian Schulz [mailto:sebastian.schulz@sebastian-schulz.com]
Sent: Wednesday, February 21, 2001 10:07 AM
To: tomcat-user@jakarta.apache.org
Subject: best way to handle Servlets+JSPs+multiple Frames?


hi,

i want to develop a WebApplication
using Servlets+JSPs+JavaBeans.
(MVC)

So far no problems.

But on client-side i need a frame-based solution.
Every Frame itself is a JSP. The following i need to 
get working as smart as possible:

User-action at one Frame causes the Servlet to change
this but also all the other JSP-Frames acording to the
current action.

I know i can do this by including a JavaScript-Function
which produces a request for every Frame to the Servlet.

This sucks because of:
- i need JavaScript
- it is not smart and will lead to bad performance because of multiple, 
  redundant requests
- it is quite dangerous for some (altering) operations, which 
  shold take place only one times!

so i would be very glad, if someone have a more elegant solution!
may be there is a "best way" for this kind of problem...
thanks in advance.

bAs T.

Mime
View raw message