HTML-FRAMES with jsp as sorce
Hi,
I use a HTML with 5 FRAMES, 2 of them with jsp-files as src.
How can I pass data to these jsp-files before the servlet calls the HTML?
Is this possible at all?
Thanks a lot
you can reference and set hidden input values inside another frame by referencing them in javascript function. afterwards, submit the form ...
function submitInfo() {
top.frames["frameName"].document ... // branch for NS and IE
document.forms["currentForm"].submit();
}
Similar Messages
-
How Can i use Html frames with simple JSP???
How Can i use Html frames with simple JSP???
Actually i am creating an application in which i have used Index.html as frame.
Noew i am trying that if i click on a link of one frame(say menu frame) the \result shoul come to some other frame(say frame named mainwindow).
Hoe can i do like this???
Anand PritamWell i am using..
< Base target="mainwindow">
But it is no working is there some other way?? -
Can't create dynamic html elements with jsp????? important
Hi All,
I am having problem creating dynamic html elements with jsp tags, i have tried to use EL and java scriplet, both of them don't work.
i am trying to create dynamic menu in my "rightMenu.jspf", based on, if user has logged in or not.
some like this!
<jsp:if test ="${validUser == null}">
some simple text menu here
</jsp:if>
but it is not working. it simply loading all and images with in statement, regardless of whether user has logged in or not. i think some how if statement is not working properly.
"validUser" is a session bean, which is not creating at this point, it will created when user will log in successfully. and also this session bean does not exist at the page, where i am trying to check that .
Is there any way to create dynamic values in jsp. It is really important, is there any body who help me in this matter. i would be really grateful.
zamanhi jaspre,
thanks for replying me. you know what, is it not something wrong with web.xml file. i remember once, i deleted some from there, a property with "*.jsp". i can't remember what exactly was it though.
all if statements works on files ending with extension ".jsp" but don't work only on with extension ".jspf". there must be to do with this.
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>ValidateServlet</servlet-name>
<servlet-class>ValidateServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ValidateServlet</servlet-name>
<url-pattern>/ValidateServlet</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>pollAndCometEnabled</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dwr-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>
main.jsp
</welcome-file>
</welcome-file-list>
</web-app>
if any one can figure it out. i would be grateful.
zaman -
Dynamic HTML elements with JSP?
I need to have a row in a HTML page which contains of a combox and two text fields.
Depending on what I select in the combox I have to insert another row (which contains another combox and two text fields) or I have to remove one or both text fields from the current row.
Is that possible with JSP?
Many thanksYou can certainly accomplish what you're asking for in a jsp. One of the tricks you can use to solve your problem would be to pass variables back into the page using the Get method and catching the values using the request.getParameter() technique. One quick tip, you should wrap any request.getParameter() elements with a try catch, if you try to grab a parameter that hasn't been defined yet (and this is perfectly acceptable) you'll get a null returned.
I hope this helps -
Building HTML page with JSP from different applications
Hi,
we need to build a HTML page with 2 JSPs. If both JSP were in the same Application
(Weblogic 8,1) there is no problem. But I have to use JSPs from differents web
applications, each JSP is in different war files.
How can I compose this page? How can I management the request object?
thanks
Your program print the whole jsp source code??
This is your web server configuration problem.
Your web server handle your jsp page like text file only. -
Converting an html file with jsp contents to a text file for download
Hi guys,
I'm currently having troubles with downloading a .jsp file to a doc file.
The thing is i am able to download the desired file and make it as a .doc but when i open it with ms word 2007 i can only see the content of the html. The dynamic content generated from the database and reflected on the .jsp page that i suppose to download and convert to .doc file doesn't show.. I hope someone could help me... My servlet code is this:
public class FileDownload extends HttpServlet
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
try
String originalFileName="localhost:8080//Appsdev//reportresults1.jsp";
File f=new File(originalFileName);
System.out.println("THE 1st f:"+f);
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment; filename=tryreport.doc;");
response.setHeader("Cache-Control", "max-age=0");
byte[] buf = new byte[1024];
FileInputStream inStream = new FileInputStream(f);
OutputStream outStream = response.getOutputStream();
int sizeRead = 0;
int size = 0;
while ((sizeRead = inStream.read(buf, 0, buf.length)) != -1)
outStream.write(buf, 0, sizeRead);
size += sizeRead;
inStream.close();
outStream.close();
catch(Exception e)
e.printStackTrace();
}Hi BalusC,
sorry for the double post i'm newly registered and it's my first post before i was just reading other's threads.
well last night while i was reading and researching for a solution a came across this.
<%@ page language="java" contentType="application/msword"%> naturally for my other jsp pages, the contentType is text/html so when the page loads it display in the browser. But with application/msword when i direct the page to the jsp page that i want to download and set the contentType with that...it prompts a window like when you're downloading the one with the <open with and save as>. It works fine to, i was able to see the report that i have to download and it is formatted very much like what i am seeing on the browser. My only concern now is the file i am able to download is a .jsp file how could i change that to a .doc file and be able to see the same content like the one with the .jsp file that i have right now.... any help or examples would be greatly appreciated. I didn't use the servlet anymore because even though i am able to download there is no content the html parts only but iam able to change the extension for the file...thanks again! ^ ^ -
is it possible to send an email with html content and how do i do that
Try this
<%@ page import="sun.net.smtp.SmtpClient,java.io.PrintStream" %>
<%
try{
String host = "IP"; //this is u r IP adress
String from = "[email protected]"; //mail adress of sender
String to = "[email protected]"; //mail address whom to
SmtpClient smtp = new SmtpClient(host);
smtp.from(from);
smtp.to(to);
PrintStream out1 = smtp.startMessage();
out1.println("To: " + to);
out1.println("Subject: Hello peter ");
out1.println();
out1.println("Hi Peter How r u doing ");
out1.flush();
out1.close();
smtp.closeServer();
catch(Exception e)
out.println(e+e.getMessage());
%> -
Hi I've been working an an email bean for some time now. I have got almost everything working. I am just getting hung up on formating the email. I want my email to be in HTML so that I have more control over the formating. To that end my message is set up as
msg.setContent(message, "text/html"); in my class file.
My JSP page is as follows.
<html>
<%@ page import="sendmail.SendMail"%>
<body>
<%String to = "[email protected]";%>
<%String from = "[email protected]";%>
<%String subject = "Test E-Mail through JSP";%>
<%String message = "<h1>This is a test of sending a plain text e-mail through JSP.</h1><br> Here is line 2.";%>
<jsp:useBean id="sendEmail" class="sendmail.SendMail" scope="session">
<jsp:setProperty name="sendEmail" property="to" value="<%=to%>" />
<jsp:setProperty name="sendEmail" property="from" value="<%=from%>" />
<jsp:setProperty name="sendEmail" property="subject" value="<%=subject%>" />
<jsp:setProperty name="sendEmail" property="message" value="<%=message%>" />
</jsp:useBean>
<%
sendEmail.sendEmail();
%>
The page displayed. Did the email send?
</body>
</html>The email that this page is sending is in HTML format, but the formating is not evident in the message. I'm sure that I'm missing something very minor but for the life of me I can't figure it out. Any help would be appriciated. Thanks.
Never mind. It turns out that this was caused by me seting the bean to a session type. When I stopped and started Tomcat it worked fine. So I changed the bean to request and it is working fine now.
Edited by: Millisa on Apr 30, 2008 9:55 AMTry this
<%@ page import="sun.net.smtp.SmtpClient,java.io.PrintStream" %>
<%
try{
String host = "IP"; //this is u r IP adress
String from = "[email protected]"; //mail adress of sender
String to = "[email protected]"; //mail address whom to
SmtpClient smtp = new SmtpClient(host);
smtp.from(from);
smtp.to(to);
PrintStream out1 = smtp.startMessage();
out1.println("To: " + to);
out1.println("Subject: Hello peter ");
out1.println();
out1.println("Hi Peter How r u doing ");
out1.flush();
out1.close();
smtp.closeServer();
catch(Exception e)
out.println(e+e.getMessage());
%> -
Hi,
I have a Read-Only-Table and I want when the user click in the table-headers-colums, the table be re-order.
This is possible ?
Tank´s.Are you using ADF BC for the persistence?
If you do then you can expose a method in the AM that recieves a column name as a parameter and uses the view-object's setOrderByClause() method to reorder the data and display it in the page. -
Rewrite a complete HTML page with all result inside with JSP
i have generate a HTML page with JSP. Then by an action on a menu on the left frame,i have to rewrite this page with the data already seized, and more code inside(i.e complete the page).
How can i do ?Use JavaScript to tell the other frame to reload or to go to another location. Generate the JavaScript if you're processing a request of the menu...
-
Can we use frames and jsps together..
Is it good to use frames with jsps.performence wise..bcos when iam calling jsps in frames it taking more time..to laod..
regards,Remember, 2 frames == 2 HTTP requests. 3 frames == 3 requests, etc.
It will take longer of course. To think otherwise is crazy. However there are times when the benefits are there. I've used them, expecially if it's a situation where taking a little longer on the initial load makes all other accesses faster. This is particularly the case when I've got a fancy UI that uses lots of graphics. I don't need to load the graphics more than once so I put them in separate frames and only have one frame (which is mostly text) change content. -
I have seen several references to this problem on this forum but no real solution on any of the pages I have found. My jsp, which right now is no more than a static HTML page with jsp as the extension so that I can add the java code later, will not display in firefox it only shows the source code when I go to my website. Some example code is below.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title>
Sichutech.com
</title>
<link rel="stylesheet" href="theme/NewMaster.css" type="text/css">
</head>
<body>
<div class="spacer"> </div>
<div id="banner" align="left">
<img src="images/logocropped.png">
</div>
<br class="clearboth">
<div class="spacer"> </div>
<div id="row1col1" align="left">
<img src="images/home.png"><br>
<img src="images/mission.png"><br>
<img src="images/about.png"><br>
<img src="images/services.png"><br>
<img src="images/contactus.png">
</div>
<div id="row1col2" align="left">
<img src="images/worldwide.png"><br><br>
<p>
<b>Stand alone application development:</b><br><br>
We provide stand-alone application development for businesses of any size.
Our applications are developed in Java using best standards and practices.
</p>
<p>
<b>Web Development:</b><br><br>
We provide custom web development for businesses of any size. We use J2EE
technologies to develope all web applications. These technologies consist
of Java, Javascript, Java Beans, HTML, JSP, XML, and other technologies as
applicable.
</p>
<p>
<b>Questions:</b><br><br>
For a quote on a custom stand-alone or web application to meet your business
needs please contact us through the contact us page.
</p>
</div>
<br class="clearboth">
<div class="spacer"> </div>
<div id="footer">
Home
Mission
About Us
Services
Contact Us
•
Copyright © Sichutech 2008 All Rights Reserved
</div>
<br class="clearboth">
</body>
</html>
The website is up and running and displays fine in IE but not firefox. The site address is www.sichutech.com
Any help is greatly appreciated.
Thanks,
RobertHere is what I see at the response headers:
Date: Wed, 06 Aug 2008 02:37:52 GMT
Server: Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8b DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 mod_jk/1.2.25 mod_perl/2.0.4 Perl/v5.8.8
Last-Modified: Mon, 04 Aug 2008 22:42:24 GMT
Etag: "aa0088-602-453aa0d911400"
Accept-Ranges: bytes
Content-Length: 1538
Content-Type: text/plain
X-Antivirus: avast! 4
X-Antivirus-Status: Clean
200 OKNote the content type: it is text/plain instead of text/html. And FireFox interpreted it correctly as text/plain. -
Alternative to HTML Frame in struts/jsp
I am using Struts/JSP for my application..
I have 3 panels(3 jsp's) each with a table of information.. each jsp has a summary part to it.. the data & information in the summary is the same across all panels.. Currently I've copy pasted the code for the summary in all 3 jsp's & Actions & ActionForms... I would like to change this to using a 4th panel sort of for the summary information... not sure what would be the best way to do this.. html frames or anything better maybe.. ?
Thanksdid u consider using struts tiles?
http://struts.apache.org/userGuide/dev_tiles.html -
Any success with html frames + JSF
Hi all, did anybody succeed in building a JSF-based application which uses HTML frames ? If yes, could be an example (jsp pages) posted here ?
I read that JSF navigation should not work with frames. If true, what about alternatives ? Facelets ?
Thanks -- RenzoWell, it worked perfectly for me...
index.html :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>InteliIdent 0.1a</title>
</head>
<frameset rows="10%,80%,10%">
<frame name="_header" src="layout/header.jsp" noresize scrolling=no>
<frameset cols="15%,*">
<frame name="_menu" src="layout/menu.jsp" noresize scrolling=no>
<frame name="_home" src="layout/home.jsp" noresize>
</frameset>
<frame name="_footer" src="layout/footer.jsp" noresize scrolling=no>
</frameset>
</html>Every page is simple JSP page, but it is also possible to use JSF pages by modifing the links to /faces/layout/footer.jsp" (if you JSF servlet is configured to listen to /faces/*) or /layout/footer.faces (if you JSF servlet is configured to listen to *.faces) -
How to bring Login.jsp under a html frame ?
hi all.
I have customized the Login.jsp and actually have lot of static content to be displayed in our proposed entry page.
I decided to use Html frames - something like the one below.
When i point on the frame to the Login.jsp ( i referred it as 'amserver/UI/Login') --> it loads all frames then redirects the page to the /amserevr/UI/Login -> the Login.jsp now occupies the entire screen and i c none of the html frames..
any idea how to bring in the portal Login.jsp under a html frame ?
Thanks
Vee
<html>
<frameset noresize="noresize" frameborder=0 rows="25%,70%,5%">
<frame frameborder=0 noresize="noresize" src="/amserver/UI/Login" name="banner_frame" scrolling=no>
<frameset frameborder=0 noresize="noresize" cols="30%,70%">
<frame frameborder=0 src="./images/menus.gif" name="menu_frame" scrolling=no>
<frame frameborder=0 src="./images/content.gif" name="content_frame" scrolling=no>
</frameset>
<frame frameborder=0 src="./images/copyright.gif" name="copyright" scrolling=no>
</frameset>
</html>is it possible to write jsp code or javascript code inside this Login.jsp ?
I got a bunch of content - menu driven to displayed additional to the identity server login module.
veera
Maybe you are looking for
-
DB High Availability - Java Edition
I am using Berkeley DB Java Edition to do writes and reads to my database. I am planning on having a cluster of databases with HA feature. I noticed that the feature set for Berkeley DB Java Editon does not include High Availabilty. I did check the C
-
With newest IOS7, installed this morning, can no longer change just one time, a recurring event-like a monthly meeting. It used to ask if i want to change for this event only, or for all the events. How else can you change the time "just this once"
-
Why can't I get a key for the Office Consumer Technical Preview now?
So.. I tried for many times to get a key for my new office 16 technical preview but failed all the times. Now the office on my PC is running out of time. So I cannot use it now. How could I get a key to let it work?
-
Hi All, When I run the T-code ME53N , i am getting error "Error in function module TREEV_CREATE_COLUMN_TREE" . Please let me know how i can avoid this error and display the PR through ME53N. Thanks in advance
-
Is there a way to export Itunes library including playlists into folders?
Hey, i have quite a large library with over 100 playlists some playlists themselves in playlist folders Is it possible to export all playlists (Including playlist folders) into folders and for them to keep there structure? For example Playlist folder