Getting jsp html generated code

Hi,
I face a problem that I can't solve easily.
I've got a jsp page and I would like to save the html content generated in a file to be more efficient for future connections (if no change have been made).
The way I tried was :
1) at the end of my jsp, i do a forward :
RequestDispatcher requestDispatcher = request.getRequestDispatcher("htmlSaveServlet");
requestDispatcher.forward(request, response);
2) In my Servlet, I would like to get the content of ServletResponse stream, but :
it's an outputstream,no way to read it
I tried the BodyContent with PageContext but seems not work.
What is the way to do it ?
thanks for your ideas
cheers
thierry
PS: I use struts to generate jsp. (it shouldn't change anything)

Why don't you just right click on the displayed HTML page, select "View Source", and save the HTML to a source file?

Similar Messages

  • Need help with flashvars in cs5.5 html generated code

    how could use flashvars in cs5.5 html generated code, there are tutorial in net about flashvars but its all cs4 with javascript in it while cs5.5 html code doesn't have. here is the code for non-IE generated by cs5.5
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="sample.swf" width="800" height="800">
    <param name="movie" value="sample.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#000000" />
    <param name="play" value="true" />
    <param name="loop" value="true" />
    <param name="wmode" value="window" />
    <param name="scale" value="showall" />
    <param name="menu" value="true" />
    <param name="devicefont" value="false" />
    <param name="salign" value="" />
    <param name="allowScriptAccess" value="sameDomain" />
    <!--<![endif]-->
    <a href="http://www.adobe.com/go/getflash">
    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
    </a>
    <!--[if !IE]>-->
    how can I put flashvars in html and as3?

    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="sample.swf" width="800" height="800">
    <param name="movie" value="sample.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#000000" />
    <param name="play" value="true" />
    <param name="loop" value="true" />
    <param name="wmode" value="window" />
    <param name="scale" value="showall" />
    <param name="menu" value="true" />
    <param name="devicefont" value="false" />
    <param name="salign" value="" />
    <PARAM NAME=FlashVars VALUE="imageFilename=images%2Fimage1%2Ejpg">
    <param name="allowScriptAccess" value="sameDomain" />
    <!--<![endif]-->
    <a href="http://www.adobe.com/go/getflash">
    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.g if" alt="Get Adobe Flash player" />
    </a>
    <!--[if !IE]>-->
    and you can read via flash AS3:
    http://www.permadi.com/tutorial/flashVars/indexAs3.html

  • How to get the HTML Source code from the active browser ?

    Hi All,
    I need to get the HTML Source code from the active browser (IE). I tried with the below code, but I am not able to get the Source code all the time, with respect to the different applications (http or https) and the user authentication has to be changes in few applications (_I dont know or not able to given that in the below code_). More over there is also a dependence of the URL to get the HTML Source code.
    Therefore what I feel is getting the HTML Source code from the given or active browser will be consistent than the URL. Since the Source code is available in the browser (IE) . Please help me with a sample code to achieve this . . . !
    HTMLDocument doc=(HTMLDocument) kit.createDefaultDocument();
    doc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);
    URL url = new URL(strURL);
    Reader HTMLReader = new InputStreamReader(url.openConnection().getInputStream());
    kit.read(HTMLReader, doc, 0);Thanks in advance,
    Regards,
    Jothi Venkatachalam
    Edited by: j0o on May 7, 2009 3:11 AM

    The simple answer is: you don't.
    Not only is it simply not possible, but the entire concept of "the active browser" doesn't exist.
    You were on the right track with your code to retrieve the page directly from the server, but as you noticed that code will only work for regular http connections.
    For https and other protocols you will need to use appropriate libraries for each protocol. Something like Apache Commons can help you with that. There are networking libraries in there for a lot of commonly used protocols.

  • Error while generating code in brf+ function

    Hi all,
    i am getting error while generating code in function in bRF+
    am using weight fields ..if i dont use quantity fields am able to generate code .
    please help.
    Thanks.

    Can you provide more details? What exactly is the error?
    I think we have provided a note for the issue. With the details it should be possible to identify the note number.

  • How can I get HTML source code of dynamic Web page ?

    Hi,
    I would like to write a program that can get HTML source code of some Web pages, but there are some dynamic Web pages that I can't do it with URL class. For example: http://www.europlex.ch/web/3schedule/showAll.jsp?context=schedule.
    Thank you very much for any solution.

    Thank you for your attention. I'm sorry because I could't describe it clearly. If you don't mind, please follow this step to understand my problem:
    In the browser, enter URL: http://www.europlex.ch/web/main.jsp?locale=_english
    Click on Schedule, you will see the page with Cinema name, Film, Time... I would like to write Java Program to get HTML code of only this Page (Not frame page).
    Do you have any idea ?
    Thanhks,

  • HTML picture code generator

    I have
    null

    Sorry my computer crashed there and I can't log back into my account.....anyway as I was going to say. I appologise for that first comment mess up.
    well I've finished a program that generates html code for people on websites like myspace who don't know how to code in xhtml, and I'm just making it open source for people to use and if anyone would like to improve on this or change something, add something or what ever I would like to see what you come up with =D
    Or if you just like to comment on my code, I've just started to learn java so any bad habbits that I have I want to try and get rid of them now :P
    * SimpleFrame class
    * @date 18/06/06
    import javax.swing.*;
    public class SimpleFrame extends JFrame {
         public void showIt()
              this.setVisible(true);
         public void showIt(String title)
              this.setTitle(title);
              this.setVisible(true);
         public void showIt(String title,int x,int y)
              this.setTitle(title);
              this.setLocation(x,y);
              this.setVisible(true);
    * Main Class
    * @date 18/06/06
    import java.awt.*;
    import javax.swing.*;
    public class Main extends SimpleFrame {
         Panel panel = new Panel();
         public static void main(String[] args)
              Main main = new Main();
              main.showIt("html picture code maker");
         // Labels, TextFields and Buttons
         private JLabel info = new JLabel(" Welcome to the html picture code generator");
         private JLabel name = new JLabel(" Name of picture:");
         private JLabel link = new JLabel(" Link:");
         private JLabel height = new JLabel(" Height of picture (e.g. 200) :");
         private JLabel width = new JLabel( " Width of picture (e.g. 200) :");
         private JTextField nameText = new JTextField();
         private JTextField linkText = new JTextField();
         private JTextField heightText = new JTextField();
         private JTextField widthText = new JTextField();
         // Buttons at the bottom of the page
         private JButton more = new JButton("More");
         private JButton finish = new JButton("Finish");
          * Adding JLabels, TextFields and Buttons to constructor
         Main(){
              Listener listener = new Listener(this);
            // Setting size and colour
              this.setBackground(Color.WHITE);
              this.setPreferredSize(new Dimension(400,400));
              // Setting Layout
              BorderLayout borderLay = new BorderLayout();
              this.setLayout(borderLay);
              this.setLayout(new GridLayout(0,1));
              this.setLocation(200,200);
              // Adding Labels, TextFields and buttons
              this.add(info);          
              this.add(name);          
              this.add(nameText);
              this.add(link);
              this.add(linkText);
              this.add(height);
              this.add(heightText);
              this.add(width);
              this.add(widthText);
              //this.add(more);
              this.add(finish);
              pack();
              // Adding listeners to the buttons
              more.addActionListener(listener);
              finish.addActionListener(listener);          
          *  Method to get the Name of the picture
          *  entered into the text field
         public String getName()
              return nameText.getText();
          *  Method to get the Link of the picture
          *  entered into the text field
         public String getLink()
              return linkText.getText();
          *  Method to get the Height of the picture
         public String getPicHeight()
              return heightText.getText();
          * Method to get the Width of the picture
         public String getPicWidth()
              return widthText.getText();
    * Listener Class
    * @date 18/06/06
    import java.awt.*;
    import java.awt.event.*;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.PrintWriter;
    import javax.swing.*;
    public class Listener extends JFrame implements ActionListener{
         Main main;
         Listener(Main p){main = p;}
         public void actionPerformed(ActionEvent e)
              String actionCommand = e.getActionCommand();
              if(actionCommand.equals("Finish"))
                   addToFile();
                   leave();
          * Method that prints out all the html code
          * to the txt file
         public void addToFile()
              PrintWriter outputStream = null;
            try
                outputStream =
                    new PrintWriter(new FileOutputStream("html.txt"));
            catch(FileNotFoundException e)
                System.out.println("Error opening the file");
            outputStream.println("<img src=\"" + main.getLink()+ "\""
                      + "alt=\"" + main.getName() + "\""
                      + "width=\"" + main.getPicWidth()
                      + "\"" + "height=\""
                      + main.getPicHeight() + "\"/>");
            outputStream.close();
          * Method to leave the program
         public void leave()
              ButtonListener buttonListener = new ButtonListener();
              getContentPane().setLayout(new BorderLayout());
              JLabel label = new JLabel(" Thank you for using my program :)");
              //label.addMouseListener(this);
              add(label, BorderLayout.CENTER);
              JPopupMenu m = new JPopupMenu("Menu");          
              m.addSeparator();          
              label.setComponentPopupMenu(m);               
              pack();
              setLocationRelativeTo(this);
              JButton ok = new JButton("Close");               
              this.add(ok);     
              ok.addActionListener(buttonListener);          
              this.setLayout(new GridLayout(0,1));
              this.setSize(260, 200);
            this.setVisible(true);     
            this.setTitle("HTML");
            this.setLocation(300,300);
            this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         public void mouseExited(MouseEvent m){     
        public void mouseEntered(MouseEvent m){     
        public void mousePressed(MouseEvent m){     
        public void mouseReleased(MouseEvent m){     
        public void mouseClicked(MouseEvent m){
    * ButtonListener Class
    * @date 18/06/06
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class ButtonListener implements ActionListener{
         public void actionPerformed(ActionEvent e)
              String actionCommand = e.getActionCommand();
              if(actionCommand.equals("Finish"))
                   System.out.println("Test");
              else if(actionCommand.equals("Close"));
                   System.exit(0);
    }

  • How to convert the source code in JSP,HTML&BEANS into executable files?

    Sir,
    We are developing one s/w product in JSP,HTML&BEANS.Now we are in the implementation phase.During the time of Installation,without copying our source code in the customer's site I want to copy the executable files of the entire source codes? Is it possible in JSP,HTML&BEANS?

    In theory you can do it even with JSP but the you will be unable to run it on the standard JSP engine. :-)
    From other hand, all critical logic should be in the Java Beans or at least in custom tags but not in the JSP code. Then you can protect that code and leave JSP open because there is nothing to steal or break.

  • How to get the size of JSP html output?

    Hi,
    Is there a JSP method to get the size of JSP HTML output.
    e.g. I would like to print the size of the JSP e.g.
    Size of this page is <%=pageContext.getPageSize()%> Kb ???
    Any ideas? Thanks.
    George
    Edited by: googchro on Jan 5, 2010 4:45 PM

    Would you like to print "the size of this page is..." before or after you calculate the size of the page.
    Because adding that bit of text to the page will make the page bigger...
    Doing it in java, the best approach would probably to have a filter counting the number of bytes that gets sent to the writer/output stream.
    A client side tool measuring the amount of bytes received would probably be easier though.
    You can always look at the Content-length header sent with a response. Though you normally don't have access to that on the java/jsp side, as it is sent by the container.
    cheers,
    evnafets

  • How can I get the HTML codes in illustrator?

    Hi, I am a graphic designer, and I am getting into the web world, I wanna know how can I get the HTML codes to upload a web design made using Illustrator,...¡?Does any one know?Please let me know...

    everyone here is right, dreamweaver is better and you will need to understand html for this to work. HOWEVER, you can make a functional website using just illustrator and notepad (or text edit if you're on a mac).
    Design your site in illy, slice it up with the slice tool. http://s23.postimg.org/mv311kpp7/test_illy.jpg 
    Save for web and select html and images, you'll get an html file and an images folder. Open the HTML file in your text editing program and it will look like this: http://s10.postimg.org/f32nf6r2h/html_stuff.jpg   you'll have to know HTML codes but you can find tutorials online for most stuff, you'll just have to figure it out. In my fake site, i linked a button to google so i had to add <a href> tags to the code. http://s22.postimg.org/5avpadhch/a_href.jpg  save the html file and open it in your web browser, hopefully not IE. You can't tell in the picture but the middle button actually does link to google. http://s21.postimg.org/qd77slqmf/firefox.jpg

  • Where can I get a decent HTML Generator package?

    I am reading Oreilly's Servlet Programming book and I'm looking for a free HTML Generator package that is simple to install and that has good documentation. Can anyone here point me out in the right direction?

    it's in HtmlConverter.exe file.
    i guess you get it together with jdk, if not- check on java.sun.com

  • How to keep the servlet java code the JSP engine generated?

    Hello there!
              I am using some JSP in a web application, and would like to take a llok
              at the servlet java files th weblogic JSP engine generated.
              In my weblogic.properties file I have the following line:
              "# Set up WebLogic JSP properties
              weblogic.httpd.register.*.jsp=weblogic.servlet.JSPServlet
              weblogic.httpd.initArgs.*.jsp=\
              pageCheckSeconds=1,\
              compileCommand=F:/VisualCafeEE/bin/sj.exe,\
              workingDir=F:/weblogic/myserver/classfiles,\
              verbose=true,\
              keepgenerated=true"
              However, the only things I can find are the class files compiled from
              the servlet java files.
              Any suggestions?
              Thanks.
              Jeff.
              

    Moerover, if you follow the example web.xml Weblogic provides
              (http://www.weblogic.com/docs51/classdocs/sample_web_xml.html), the parser
              would complaint big time.
              The <servlet> and <context-param> tags have to be switched.
              Jeff
              "John J. Feigal" wrote:
              > I'm not sure why, but specifying keepgenerated=true in weblogic.properties
              > did not do the job for us.
              >
              > We had to add the following to our application's web.xml file:
              >
              > <!-- keepgenerated initArg to JSPServlet -->
              > <context-param>
              > <param-name>weblogic.jsp.keepgenerated</param-name>
              > <param-value>true</param-value>
              > </context-param>
              >
              > --
              > John J. Feigal Voice (651)766-8787 (main)
              > Sr. Technical Consultant (651)766-7249 (direct)
              > Ensodex, Inc. Fax (651)766-8792
              > 4105 N. Lexington Ave., Suite 150 email [email protected]
              > Arden Hills, MN 55126 WebSite http://www.ensodex.com
              >
              > "Jong Lee" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > You have the init arg "keepgenerated" tunred on in weblogic.properties.
              > > The java file should be kept in the same directory of your jsp file.
              > >
              > > You can also use "jspc" to generate the java source.
              > > i.e:
              > > "java weblogic.jspc -keepgenerated yourjspfile"
              > >
              > >
              > >
              > >
              > >
              > > Jeff Wang <[email protected]> wrote:
              > > >Hello there!
              > > >
              > > >I am using some JSP in a web application, and would like to take a llok
              > > >at the servlet java files th weblogic JSP engine generated.
              > > >
              > > >In my weblogic.properties file I have the following line:
              > > >
              > > >"# Set up WebLogic JSP properties
              > > >weblogic.httpd.register.*.jsp=weblogic.servlet.JSPServlet
              > > >weblogic.httpd.initArgs.*.jsp=\
              > > > pageCheckSeconds=1,\
              > > > compileCommand=F:/VisualCafeEE/bin/sj.exe,\
              > > > workingDir=F:/weblogic/myserver/classfiles,\
              > > > verbose=true,\
              > > > keepgenerated=true"
              > > >
              > > >However, the only things I can find are the class files compiled from
              > > >the servlet java files.
              > > >
              > > >Any suggestions?
              > > >
              > > >Thanks.
              > > >
              > > >Jeff.
              > > >
              > >
              

  • Error while deploying generated code from sup to iPhone

    Hi
    I generated the code using Sap unwired platform for Objective-c.  I followed the steps specified in the below link
    http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc01213.0153/doc/html/mqu1264543829068.html
    for deploying the generated code into iPhone simulator, i am getting the following error
    Undefined symbols:
      "_OBJC_CLASS_$_SUPEntityAlias", referenced from:
          objc-class-ref-to-SUPEntityAlias in SUP101_Customer.o
          objc-class-ref-to-SUPEntityAlias in SUP101_LogRecordImpl.o
    Can any one help me in this
    Edited by: KiranSanka on Dec 2, 2010 1:18 PM
    Edited by: KiranSanka on Dec 3, 2010 7:26 AM

    Hi
    While compiling did you get a warning? something along the line "missing required architecture i386 in fileu201D? if so refer this link http://stackoverflow.com/questions/1456185/build-error-missing-required-architecture-i386-in-file
    Regards
    Jinesh

  • How to set static name and id for IFRAME html generated

    Hi,
    The name and the id of the Iframe is generated dynamically as shown in this example (final html generated):
    <IFRAME frameBorder=0 id="ivuFrm_page0ivu3" name="pb_837905732" title="Direccion Comunicaciones Integradas Home" src="home_direccion_comunicaciones_integradas.html" style="WIDTH:100%;HEIGHT:455px;" fixedHeight="455px" ></IFRAME>
    However, we need to link to this iframe using the  "target" property which has not been possible because we need static iframe name.
    Anny suggestions?
    THANKS.

    Hi,
    first of all  i think it is possible, you just need create a layout with nwds,  Thats possible in a .Par project you need this referance in portalapp.xml ;
    <property name="ClassName" value="com.sapportals.portal.pb.layout.PageLayout"/>
    after creating this  you need create a jsp file for coding, it is possible with writing this in portalappxml ;
    <property name="com.sap.portal.reserved.layout.TemplateFile" value="example.jsp"/>
    in this jsp page write this code:
    <%@ taglib uri="prt:taglib:com.sap.portal.reserved.layout.TagLibLayout" prefix="lyt" %>
    <%@ page import = "com.sapportals.portal.prt.pom.IPortalNode" %>
    <%@ page import = "com.sapportals.portal.prt.connection.IPortalResponse" %>
    <%@ page import = "com.sapportals.portal.prt.connection.PortalHtmlResponse" %>
    <%@ page import = "com.sapportals.portal.prt.util.html.HtmlDocument" %>
    <%@ page import = "com.sapportals.portal.prt.util.html.HtmlMeta" %>
    <%@ page import = "com.sapportals.portal.prt.util.html.HtmlTitle" %>
    <%@ page import = "com.sapportals.portal.prt.util.html.HtmlDocType" %>
    <%
    IPortalNode portalNode = componentRequest.getNode().getPortalNode();
    IPortalResponse portalResponse =
         (IPortalResponse) portalNode.getValue(
              IPortalResponse.class.getName());
    HtmlDocument htmlDocument = null;
    if (portalResponse instanceof PortalHtmlResponse) {
         PortalHtmlResponse htmlResponse =
              (PortalHtmlResponse) portalResponse;
         htmlDocument = htmlResponse.getHtmlDocument();
         com.sapportals.portal.prt.util.html.Html htm = htmlDocument.getHtml();
         com.sapportals.portal.prt.util.html.HtmlBody body = htmlDocument.getBody();
         body.getElement("iframe name");
    You can get elements and change, remove or add new elements to framework
    %>
    <table width ="100%" >
                       <lyt:template>
                           <tr>
                        <td width ="25%" align="center" valign="top">
                                <lyt:container id="column1" /> 
                           </td>
                        <td width ="50%" align="center" valign="top">
                             <lyt:container id="column2" />
                           </td>
                           <td>     
                        <td width ="25%" align="center" valign="top">
                             <lyt:container id="column3" />
                           </td>
                      </tr>
                      </lyt:template>
              </table>
    After Deploying the layout, create a page with this layout and inculude the this empty  page to framework.
    İts should be work.
    Best regards.

  • In wadl2java-generated code, NullPointerException from HttpTransportPipe

    I wrote a WADL document and used JAXB schemagen to create an XSD for my Jersey RESTful web-service, and referenced that XSD in that WADL document.
    Then, I used wadl2java to generate client-code for my service.
    However, then, I had numerous jar-dependency problems while trying to run that generated code. Perhaps I got myself into some trouble by choosing the wrong jar-file in one case or another. I thought it was odd that one of the missing class-files was SOAPException. Another one is part of FastInfoSet. And one of the problems seemed to require adding a JSR-related jar provided by BEA.
    I managed to find some possibly relevant source-code. However, it seems to simply indicate no need for an outputStream for a GET-request, which makes lots of sense:
    From HttpClientTransport:
    118:            public OutputStream getOutput() {
    119:                try {
    120:                    createHttpConnection();
    121:                    sendCookieAsNeeded();
    122:                    // for "GET" request no need to get outputStream
    123:                    if (requiresOutputStream()) {At this point, I'm not able to use wadl2java, thanks to this failure to get this generated client-code running. I'd like to avoid writing custom client-code instead. I'd sooner revert to SOAP and wsdl2java.
    Any help with this would be much appreciated.
    Exception in thread "main" javax.xml.ws.WebServiceException: java.lang.NullPointerException
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:157)
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:74)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:559)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:518)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:503)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:400)
         at com.sun.xml.ws.client.Stub.process(Stub.java:228)
         at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:167)
         at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:193)
         at com.sun.research.ws.wadl.util.JAXBDispatcher.doGET(JAXBDispatcher.java:92)
         at com.foo.bar.restapi.client.Endpoint$Product.getAsProduct(Endpoint.java:66)
         at com.foo.bar.restapi.client.Test.main(Test.java:9)
    Caused by: java.lang.NullPointerException
         at java.io.Writer.<init>(Unknown Source)
         at java.io.OutputStreamWriter.<init>(Unknown Source)
         at com.bea.xml.stream.XMLOutputFactoryBase.createXMLStreamWriter(XMLOutputFactoryBase.java:45)
         at com.sun.xml.ws.api.streaming.XMLStreamWriterFactory$Default.doCreate(XMLStreamWriterFactory.java:204)
         at com.sun.xml.ws.api.streaming.XMLStreamWriterFactory$Default.doCreate(XMLStreamWriterFactory.java:199)
         at com.sun.xml.ws.api.streaming.XMLStreamWriterFactory.create(XMLStreamWriterFactory.java:152)
         at com.sun.xml.ws.encoding.xml.XMLCodec.encode(XMLCodec.java:35)
         at com.sun.xml.ws.encoding.MimeCodec.encode(MimeCodec.java:64)
         at com.sun.xml.ws.encoding.XMLHTTPBindingCodec.encode(XMLHTTPBindingCodec.java:173)
         at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:128)
         ... 11 more

    Thanks, that solved that problem.
    Then, however, I had a couple of other problems, having to do with namespace declarations. I've apparently fixed them.
    The one remaining problem is that the generated code seems to treat a certain template parameter as if it were a header-parameter. The WADL-file definitely uses style="template" for that parameter.
    I temporarily manually patched the generated EndPoint class to get it working.
    The effect of this problem was that the result was in the form of the HTML-message returned by Apache when a resource cannot be found. That was because that template parameter was missing and was being passed instead in a header.
    Perhaps I'll investigate this further at some point. However, "time's a wastin'", and reverting to SOAP is now quite likely.
    Thanks.

  • How to get jsp page form action this page use ajax

    i want to get form action result editThree div. however, ajaxpage open new window.how to decide it?
    ajaxCallPages.js
    var loadedobjects=""
    var loadingcontainer="loading"
    var loadstatustext="<img src='images/loading.gif' />" //loading
    var rootdomain="http://"+window.location.hostname
    function ajaxpage(url, containerid ){
    var page_request = false
    if (window.XMLHttpRequest) // if Mozilla, Safari etc
    page_request = new XMLHttpRequest()
    else if (window.ActiveXObject){ // if IE
    try {
    page_request = new ActiveXObject("Msxml2.XMLHTTP")
    catch (e){
    try{
    page_request = new ActiveXObject("Microsoft.XMLHTTP")
    catch (e){}
    else
    return false
    document.getElementById(containerid).innerHTML=loadstatustext // loading
    page_request.onreadystatechange=function(){
    loadpage(page_request, containerid)
    page_request.open('GET', url, true)
    page_request.send(null)
    function loadpage(page_request, containerid){
    if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
    document.getElementById(containerid).innerHTML=page_request.responseText
    userEditIformation.jsp
    <script language="JavaScript" src="function/ajaxCallPages.js"></script>...
    <div id="editTwo">
    <table width=100% cellpadding=0 cellspacing=0 border=0>
    <tr>
    <td>
    <form name="myform" action="pages/editUser.jsp" method="post">
    <table width=100% cellpadding=0 cellspacing=0 border=0>
    <tr>
    <td>
    <table width=100% cellpadding=3 cellspacing=1 border=0 bgcolor="#cccccc">
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">User group:</td>
    <td bgcolor="#f5f5f5"> <select name="UserGroup" id="lgroup">
    <option>Administrator</option>
    <option>Editor</option></select>
    </td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">User name:</td>
    <td bgcolor="#f5f5f5"><input type="text" id="lname" name="uname" maxlength="20" value=""> </td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">E-Mail:</td>
    <td bgcolor="#f5f5f5"><input type="text" id="lmail" name="uemail" value="" onkeypress="return checkEnter(event);" onKeyPress="Comment = false; Email = true; PostalCode = false; Go();" onChange="this.value = ignoreSpaces(this.value);"></td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">New password:</td>
    <td bgcolor="#f5f5f5"><input type="password" id="lpass1" name="upass1" maxlength="20" value="" onkeypress="return checkEnter(event);" onKeyPress="Comment = true; Email = false; PostalCode = false; Go();" onChange="this.value = ignoreSpaces(this.value);"></td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">Verify password:</td>
    <td bgcolor="#f5f5f5"><input type="password" id="lpass2" name="upass2" maxlength="20" value="" onkeypress="return checkEnter(event);" onKeyPress="Comment = true; Email = false; PostalCode = false; Go();" onChange="this.value = ignoreSpaces(this.value);"></td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">Phone:</td>
    <td bgcolor="#f5f5f5"><input type="text" id="lphone" name="uphone" value="" onkeypress="return checkIt(event);" onChange="this.value = ignoreSpaces(this.value);"></td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">Block:</td>
    <td bgcolor="#f5f5f5">
    <table cellpadding=0 cellspacing=0 border=0>
    <tr>
    <td><input type="radio" name="ustatus" id="lradio1" value="1"></td><td>Yes </td>
    <td><input type="radio" name="ustatus" id="lradio2" value="0" ></td><td>No </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">Register date:</td>
    <td bgcolor="#f5f5f5"><%getDateTimeValue valueOne= new getDateTimeValue(); out.println(valueOne.getDateTime());</td>
    </tr>
    <tr valign=top>
    <td bgcolor="#666666" width=150 style="color:#FFFFFF;" align="right">Last visit date:</td>
    <td bgcolor="#f5f5f5"><%getDateTimeValue valueTwo= new getDateTimeValue(); out.println(valueTwo.getDateTime());</td>
    </tr>
    </table>
    </td>
    </tr>
    <tr><td> </td></tr>
    <tr><td><input type="button" onclick="ajaxpage('pages/editUser.jsp', 'editThree')" value="Send"/> </td></tr>
    <tr><td height=18 id="eoncmssend"></td></tr>
    </table>
    </form>
    </td>
    </tr>
    </table></div>
    <div id="editThree">
    </div>
    editUser.jsp
    <html>
    <head>
    <link rel="stylesheet" href="css/editUser.css" type="text/css"></link>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <%
    String ugroup=null;
    String phone=null;
    String name=null;
    if(request.getParameter("uname")!=null){
    name=request.getParameter("uname");
    if(request.getParameter("uphone")!=null)
    phone=request.getParameter("uphone");
    out.println(name);
    out.println(phone);
    %>
    </body>
    </html>
    ../

    From the HTTP spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html):
    14.36 Referer
    The Referer[sic] request-header field allows the client to specify, for the server's benefit, the address (URI) of the resource from which the Request-URI was obtained (the "referrer", although the header field is misspelled.) The Referer request-header allows a server to generate lists of back-links to resources for interest, logging, optimized caching, etc. It also allows obsolete or mistyped links to be traced for maintenance. The Referer field MUST NOT be sent if the Request-URI was obtained from a source that does not have its own URI, such as input from the user keyboard.
    Referer = "Referer" ":" ( absoluteURI | relativeURI )
    Example:
    Referer: http://www.w3.org/hypertext/DataSources/Overview.html

Maybe you are looking for

  • Backed Up from macbook pro to external hard drive for use on PC--how to restore to macbook pro?

    Good evening,   My college student daughter uses her macbook pro, 13" Mid-2010,  for ALL her school work.  A few days ago it stopped working for her.  Blank screen.  Turned it off and on, blank screen with the gear spinning.  She took it to a place n

  • Set ajax value to the textbox[in modal box jquery]

    Hi, In my page i have one interactive report with 2 button add and edit, i have used modal box j-query for the button add and edit. Adding the data through modal box working fine. when tried to edit the existing data i am not able set the data to the

  • JTable won't resize

    hi ! I'm having problems with a JTable I can't find out how to resize its width I just create it the classic way and insert it in a JPanel DataModel dataModel = new MyCustomTableModel(); JTable table = new JTable(dataModel); JScrollPane tablePane = n

  • URGENT:: errors with WLS Portal GA in Workshop

    Hi, I just installed the GA version of WebLogic Platform and tried to create a Portal using Workshop. I selected a "Portal Application" and then a "Portal Web Project". The WebLogic console (stdout) shows many errors. It is not able to find the some

  • How do I load a print screen image into a picture indicator?

    Hi, I am trying to load a printscreen image into a picture indicator without first saving it. I am currently doing it by acquiring and saving a print screen image, then reloading and displaying the bitmap file. This works, but it is not elegant and t