File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes 3 little problems! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "3 little problems!" Watch "3 little problems!" New topic
Author

3 little problems!

Martin Chantler
Greenhorn

Joined: Aug 28, 2001
Posts: 1
Let me explain what I'm up to (apologies for the long explanation!)
My aim to create a Java based web application
My plan is to use only one JSP page for everything!
The JSP will load different applets when needed, the JSP is just a fancy container for the applets
I'm not sure of a few things I have done:
I have a session Bean that controls which applet to load
My applets talk to servlets that control the business logic
When I need to load another applet, my servlet sets a property in the session Bean.
I couldn't find a way to reload the JSP from the servlet so I reload from the applet itself calling a redirect. It works but I worry because the re-direct results in the destruction of the applet which is currently running!
If the Bean itself could reload the JSP it would seem cleaner but redirect reliest on having a request object
The other problem I have is that the browser caches the JSP and just reloads the same applet.
I read that some browsers ignore the settings you put in your html so create a dummy URL? parameter which fools the browser
This also works but now the browser seems to think they're different pages! My intention was for the user to only ever be on 'one' web page, if you press 'back' at the moment it lists loads of 'dummy' pages. I was hoping they would only 'see' 1 page
The only other thing is I only really want to reload the Applet and not the rest of the JSP text/graphics. Can I do this?
Sorry for the length of this!
Thanks for any help!!!
MC
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

you probably have your own reasons why you want to do it this way....JSP -> Applet -> Servlet -> Business Logic...huh!!!
I really don't want to get into that model!!!
Well, if you have to solve your problem, then do you have
an option of using HTML Frames?
What I have in mind is put the Applet in a frame by itself
and keep updating the appletFrame. Your otherFrame can have
the text.....just a thought, being creative...
regds.
- satya


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 3 little problems!