Can HTML files be parsed as JSP

I currently have my web-app configured to process html files as JSP. Is it possible to configure NitroX so that it will parse .html files as JSP?
I thought changing the Editor in the Preferences: Workbench->"File Associations" might work, but it didn't.

Thanks, that solution works great. It would be terrific if options such as that were configurable within the NitroX Preferences.
Another great preference setting would be a way to change the specified webroot. (I figured out how to do it manually.) The reason I had to do this was due to complications in getting JSTL support in the NitroX JSP editor for my existing webapp.
I use JSP 1.2 and Resin 2.x for my production server. Since JSTL is automatically provided within the container, I do not have the JSTL tld's within my WEB-INF subdirectories. In order to get the JSTL support in the NitroX JSP Editor, (without having to edit my ant build script, directory/file structure, etc), I had to create a new project, choose JSTL support, and then manually edit the .m7project file to specifiy my existing webroot folder, and then restart NitroX (or close and reopen the project). One great enhancement that would be nice, would be the ability to specify the webroot directory while creating a new Web Application.
A solution to my dilemma, and for many other people I imagine, would be to provide JSTL support inherently by allowing the developer to set a flag for the project (during and after creation). When setting that flag, the developer could then be given the option of copying the files as well. Then JSTL could be available via the corresponding standard taglib uri, such as the uri http://java.sun.com/jstl/core for the core JSTL taglib.
I am still in the trial period of NitroX. I almost gave up after spending 3-4 hours trying to get JSTL and EL to work. Things finally look promising and I can't wait to see how NitroX for JSF pans out. If some of these issues are taken care of, I imagine our company will buy a couple of licenses.
Thanks,
Jeffrey Lilly
HomeGauge

Similar Messages

  • Generate a HTML file from JSP

    Does anyone know how to generate a html file from code in JSP without using a form, as i have one of those already. I don't want this page to appear, just exist.
    Thanks

    You can do like this:
    File outputFile = new File("Publicacao.html");
    FileWriter escrever = new FileWriter(outputFile);
    escrever.write("<center><h1>Assunto:" + assunto + "</h1></center><br><center><h2>Titulo:" + titulo +"</h2></center><br><center><h3>Sub Titulo:"+subTitulo+"</h3></center><br>"+ conteudo +"<br>");
    escrever.close();

  • Preventing CFMX7 to parse all .html files

    hi,
    I have coldfusion MX 7 installed and integrated with IIS6 on
    windows2003 server. To parse .html files through coldfusion, i have
    added the following lines to
    (C:\CFusionMX7\wwwroot\WEB-INF\web.xml) web.xml files
    <servlet-mapping id="macromedia_mapping_14">
    <servlet-name>CfmServlet</servlet-name>
    <url-pattern>*.html</url-pattern>
    </servlet-mapping>
    <servlet-mapping id="macromedia_mapping_15">
    <servlet-name>CfmServlet</servlet-name>
    <url-pattern>*.html/*</url-pattern>
    </servlet-mapping>
    i have vhost site in IIS6 named something.abc.com , to make
    sure that only .html file for something.abc.com site wiill be parse
    through coldfusion MX 7, i have added .html extension mapping to
    C:\CFusionMX7\runtime\lib\wsconfig\jrun_iis6.dll.
    after restarting both coldfusion and iis6, I found that not
    only for vhost site(something.abc.com) but also for others sites "
    .html " files are parsing trhough coldfusion server, which is not
    my requirements. My requirements is .html file will be parse only
    for those vhost site that has .html extension mapping, other
    vhost's .html file should be served by IIS6.
    Any idea how to do this??
    Please Help..
    Mamun

    I'm also interested in this.
    We have a specific site that we would like to have ColdFusion
    process the .html files, but when setting up IIS and the web.xml
    file it seems to setup coldfusion to process all sites html files
    instead of just the one site.
    Is there a way to set the URL-PATTERN in the web.xml to just
    match a specific URL? Or does it only match directories and files
    under the URL string?
    Any guidance is appreciated.
    Thanks

  • How can i render a dynamic html file in jsp page

    Hi everybody,
    i am trying to render a dynamic html file in jsp page with the result of querying a database.
    The response of the query is a xml document. And i have a stylesheet to transfer it to html.
    How can i render the html in a jsp file?

    I am using below code for HTML files
    private var appFile:String="index.html";
    if (StageWebView.isSupported)
                        currentState = "normal";
                        webView.stage = stage;
                        webView.viewPort = new Rectangle( 10, 130, (stage.stageWidth)-20, 750 );
                        var fPath:String = new File(new File("app:/assets/html/aboutus/"+ appFile).nativePath).url; 
                        webView.loadURL(fPath);
                        addEventListener(ViewNavigatorEvent.REMOVING,onRemove);
                    else {
                        currentState = "unsupported";
                        lblSupport.text = "StageWebView feature not supported";
    above code is working fine for me.

  • Can I use netui in Framework jsp files?

    I'm trying to conditionally render an icon in the portlet titlebar.
    I need to query the DB to determine which icon to display,
    using a jpf action or method.
    Can I use and access porlet obejcts in the framework skeleton files (titlebar.jsp) which is part of my theme?
    zoyaf

              Do you know how JSP can use a variable defined in Javascrip ?
              Thx,
              Lin
              "Cameron Purdy" <[email protected]> wrote:
              >Write your JSP as you would any HTML file, including JavaScript. Then
              >rename the .html file to .jsp. Add your custom tags and Java code as
              >desired. Done.
              >
              >There was a complaint in the 5.0 beta about the JSP parser choking on
              >JavaScript, so I would make sure you at least try on the latest 5.1 service
              >pack, just in case.
              >
              >Cameron Purdy
              >
              >"SRINIVAS" <[email protected]> wrote in message
              >news:[email protected]..
              >> Hai,
              >> I know that we can use the jsvascript to validate the html parameters.
              >>
              >> Is the wblogic jsp support the javascript ?. I tried in weblogic
              >> 5.1.0.,the javascript is not working.
              >> anybody can help me how to validate html input and how can i use
              >> javascript in jsp.
              >>
              >> Thanks
              >> Srinivas
              >>
              >
              >
              

  • Parsing of JSP file

    Parsing of JSP File '/main.jsp' failed:
    /main.jsp(1): Could not parse deployment descriptor: java.io.IOException: cannot resolve 'http://java.sun.com/jstl/core' into a valid tag library
    probably occurred due to an error in /main.jsp line 1:
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    Sun May 06 18:27:39 GMT+05:30 2007
    I got this error when i deployed my application through weblogic...
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    I think its because of this line..can someone help me..its urgent

    /Username.jsp(3): Error in using tag library          > y uri='/WEB-INF/struts-html.tld' prefix='html':
              > cannot find tag class:
              > 'org.apache.struts.taglib.html.BaseTag'
              > probably occurred due to an error in /Username.jsp
              > line 3:
              > <%@ taglib uri="/WEB-INF/struts-html.tld"
              > prefix="html" %>
              Ok, we can tell that the JSP compiler was able to read and parse the TLD file, because it refers to a class name specified in the TLD. That's a good sign. However, after it found the class name, it wasn't able to find the actual class file. You'll need to ensure that the "struts.jar" file is in your "WEB-INF/lib" directory of the application.
              If you already have that, or it still doesn't work when you redeploy it with this, then it's possible there is a conflict with another "struts.jar" in the web application classloader context. If that other "struts.jar" is not controlled by you, but is instead controlled by WebLogic, then you may have to specify the "<prefer-web-inf-classes>" element (to specify a "true" value), which will make the web application classloader prefer classes and jars in your WEB-INF directory over classes found elsewhere.

  • How to parse a HTML file using HTML parser in J2SE?

    I want to parse an HTML file using HTML parser. Can any body help me by providing a sample code to parse the HTML file?
    Thanks nad Cheers,
    Amaresh

    What HTML parser and what does "parsing" mean to you?

  • URGENT-CREATE A HTML FILE WITH AN STRING INPUT FROM THE RUNNING JSP

    I am designing a web page where the user enters a page after entering his/her login and password.The User should now be provided with a display page containing the servers that he has permissions for access.The servers that he has permissions are maintained in a database(a normal text file in UNIX).
    Till now the program has been complete for displaying the servers that are available to him.
    I need to create a HTML form containing these servers names in a check box so that when the user clicks thcheck box against the server name it should go to the server and get the password for the required server.
    THe intention from me is to create a HTML file that dynamically takes values from the running JSP means the server names as a string value to its input and then i can continue
    Please guide me in creating a HTML form based on the string output from the running JSP
    FileInputStream fs = new FileInputStream("/root/Auth_Application/User_Access_List");
    DataInputStream in1 = new DataInputStream(fs);
    int fl=0;
    while (in1.available() !=0)
    String str1=in1.readLine();
    StringTokenizer st1 = new StringTokenizer(str1);
    String usernam=st1.nextToken();
    if (usernam.equals(uname))
    String ip=st1.nextToken();
    String host=st1.nextToken();
    fl=1;
    out.println("<tr><td>                                                                                              "+ host + "</td><td> " + ip +"</td></tr>");
    if (fl == 0)
    out.println("YOU HAVE NO SEVRER IN YOUR PROFILE !");
    in1.close();
    The host string here is the server name
    the ip is the ip address of the server
    Need to input these values to another HTML page that contains the check box list of the servers .
    once these are clicked i think i can pass on this to another JSP and retreive passwords
    Please guide me in this

    FileInputStream fs = new FileInputStream("/root/Auth_Application/User_Access_List");
                                    DataInputStream in1 = new DataInputStream(fs);
                                    int fl=0;
                                    while (in1.available() !=0)
                                    String str1=in1.readLine();
                                    StringTokenizer st1 = new StringTokenizer(str1);
                                    String usernam=st1.nextToken();
                                    if (usernam.equals(uname))
                                    String ip=st1.nextToken();
                                    String host=st1.nextToken();
                                    fl=1;
                                    out.println("<tr><td>                                                                                              "+ host + "</td><td>          " + ip +"</td></tr>");
                                    if (fl == 0)
                                    out.println("YOU HAVE NO SERVER IN YOUR PROFILE !");
                                    in1.close();I feel sorry for the inconvenience that is caused as i am new to using these forums.
    I have here used a simple program to retreive the names of the servers that the users have acess to..
    I have here read the servername and server ip stored from a file in UNIX in the running JSP.Now i need to pass these string variables to HTML file and display it in a Check box format.the strings host and ip have to be passed to the input of the HTML file so that they can further be processed once they are clicked using another JSP.
    Can anybody please help me in Passing these strings from the running JSP and display it in a check box format

  • How to include HTML file in JSP using HTML elements or Javascript?

    Hi,
    I have around 15000 static html files one for each item which we display each upon invoking an item.The HTML file should be part of a JSP file.
    Please note that the name of the HTML file is determined dynamically
    Placing all the HTML files within the web application does not give us good performance so i would like to put all of them in the webserver.
    I am not able to include the file in the JSP using the jsp:include attribute if i place the HTML files in the webserver ,
    in order to do that i think should use either HTML element or javascript to include the HTML in the JSP.is there any alternative to <Jsp:include>
    Does anyone have an idea how to include the HTML file and take advan tage of webserver?
    Any ideas are appreciated

    What you need to do is simply read the HTML file from the disk and dump it out to the outputstream. It really is that simple.
    There's no reason you need to include all 15000 files in the actual WAR, you can place those files any place handy that is easy for the application to see (in another directory, or accessible from a file server if you have multiple front ends).
    Then, just write a utiility function that takes the output stream (i.e. the 'out' JSP variable), and the file name, read the file, and write it to the stream.
    If you start noticing performance issues, then you can try doing some caching, but truth is your OS should be doing that for you.
    But, truth be told that's the only practical way to do it.
    Another solution would be to use JavaScriipt and XMLHttpRequest (i.e "AJAX") to load the file at the client side, and simply replace a tag with the results.
    That's also pretty trivial to write, any web site talking about AJAX should give you hint there.
    Of course, that won't work for folks who have JavaScript turned off, or some other incompatible browser, whereas the server side solution obviously works everywhere.

  • Problem converting a JSP to html file

    Hi,
    I want to save my jsp page as a html file so that I can later send it as email body. This jsp page is a dynamic page.
    I am giving a few code lines below that i'm using.
    url = new URL("http://localhost:9080/ndw/jobsum/execdisplay.do?id=" bean.getId().toString()";jsessionid=" +id );
    in = new BufferedInputStream( url.openStream() );
    try {
    file = new File("C:/myfile.html");
    out = new BufferedOutputStream ( new FileOutputStream ( file ));
    } catch ( FileNotFoundException e ) {
    System.out.println( "Invalid save file requested: " +
    e.getMessage() );
    try {
    bytesRead = in.read( bytes, 0,
    bytes.length );
    while ( bytesRead != -1 ){
    out.write( bytes, 0, bytesRead );
    bytesRead = in.read( bytes, 0,
    bytes.length );
    in.close();
    out.close();
    } catch ( IOException e ){
    System.out.println( "Error saving to "
    +"file: " + e.getMessage() );
    This should save the JSP given by URL as html file.
    A html file by name "myfile.html" is indeed being created in C drive but the html is of loginpage of my application and not the html file of the JSP required.
    I guess this is happening because server is not convinced that i hv logged in before accessing tht JSP. Is there any servlet API which would bypass the access control mechanisms.
    Folks, please help me in this.Its quite urgent.
    Thanks in advance

    This has nothing to do with JavaMail. You'll probably get a better
    answer from the JSP support forum.
    You might have to convince the server that you've logged in before
    you can access the JSP page. That could be fairly complicated.
    Alternatively, you might be able to access the page using one of
    the servlet APIs, which would bypass the access control mechanisms.

  • XML parser to parse XML inside HTML file

    Hi,
    I wish to know is there any other parsers apart from JAXP to parse xml content present inside HTML file. For example,
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    </head>
    <body>
    <form id="j_id_jsp_1394907664_1" name="j_id_jsp_1394907664_1" method="post" action="/msaiphoneportal1.1c/pages/xmlchech.faces;jsessionid=5666F0E1CF0E44B978940F021012AA41" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="j_id_jsp_1394907664_1" value="j_id_jsp_1394907664_1" />
    <?xml version="1.0" encoding="UTF-8"?>
    <hospital>
    <Users>
    <User id="1" password="x" type="staff" username="x"/>
    <User id="2" password="y" type="staff" username="y"/>
    <User id="3" password="z" type="staff" username="z"/>
    </Users>
    <Survey/>
    <Patients>staaatus</Patients>
    </hospital>
    <input type="hidden" name="j_id_jsp_1394907664_1:j_id_jsp_1394907664_2" /><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-4298162632826268059:-1507671971163298623" autocomplete="off" />
    </form>
    </body>
    </html>
    I need to read the XML content inside. Is there any way please let me know
    Edited by: DHURAI on Jul 22, 2010 12:59 AM

    DHURAI wrote:
    while reading, we can fetch the starting of XML through <?xml> tag, but how we know the ending of the XML as it seems to be dynamic.1) Extract the document root element which follows the <?xml ... ?>
    2) From this root element , construct the associated root element terminal by inserting a / after the <.
    3) Search for the terminal.
    If the root name can also be the name of an enclosed element then you will have to count the number of terminals.

  • Create HTML file that can display unicode (japanese) characters

    Hi,
    Product:           Java Web Application
    Operating system:     Windows NT/2000 server, Linux, FreeBSD
    Web Server:          IIS, Apache etc
    Application server:     Tomcat 3.2.4, JRun, WebLogic etc
    Database server:     MySQL 3.23.49, MS-SQL, Oracle etc
    Java Architecture:     JSP (presentation) + Java Bean (Business logic)
    Language:          English, Japanese, chinese, italian, arabic etc
    Through our java application we need to create HTML files that have to display unicode text. Our present works well with English and most of the european character set. But when we tried to create HTML files that will display unidoce text, say japanese, only ???? is getting displayed. Following is the code we have used. The out on the browser displays the japanese characters correctly. But the created file displays only ??? in place of japanese chars. Can anybody tell how can we do it?
    <%
    String s = request.getParameter( "txt1" );
    out.println("Orignial Text " + s);
    //for html output
    String f_str_content="";
    f_str_content = f_str_content +"<HTML><HEAD>";
    f_str_content = f_str_content +"<META content=\"text/html; charset=utf-8\" http-equiv=Content-Type></HEAD>";
    f_str_content = f_str_content +"<BODY> ";
    f_str_content = f_str_content +s;
    f_str_content = f_str_content +"</BODY></HTML>";
    f_str_content = new String(f_str_content.getBytes("8859_9"),"Shift_JIS");
    out.println("file = " + f_str_content);
              byte f_arr_c_buffer1[] = new byte[f_str_content.length()];
    f_str_content.getBytes(0,f_str_content.length(),f_arr_c_buffer1,0);
              f_arr_c_buffer1 = f_str_content.getBytes();
    FileOutputStream l_obj_fout; //file object
    //file object for html file
    File l_obj_f5 = new File("jap127.html");
    if(l_obj_f5.exists()) //for dir check
    l_obj_f5.delete();
    l_obj_f5.createNewFile();
    l_obj_fout = new FileOutputStream(l_obj_f5); //file output stream for writing
    for(int i = 0;i<f_arr_c_buffer1.length;i++ ) //for writing
    l_obj_fout.write(f_arr_c_buffer1);
    l_obj_fout.close();
    %>
    thanx.

    Try changing the charset attribute within the META tag from 'utf-8' to 'SHIFT_JIS' or 'utf-16'. One of those two ought to do the trick for you.
    Hope that helps,
    Martin Hughes

  • Can i import java fx in jsp or html?

    can i import java fx in jsp or html?

    coolsayan.2009 wrote:
    just to test i did rigt-click on my web-based jsp project project->new item->other->javaFX stage and wrote the example code like:
    but got all red under lined word in all the lines what to do???Ouch! Not being familiar with NetBean, I am not sure, but I fear you mix stuff.
    "web-based jsp project" => so you write JSP or HTML stuff there, no? Like including the dtfx.js file and putting the javafx({ ... }) call in the proper places.
    "wrote the example code like (JavaFX code)" => Maybe it should be in a separate JavaFX project? Then generate the .jar file and use it in the above project.
    Now maybe I am misleading (if there is a a JavaFX stage in new items of the projects, perhaps NB allows it?) so I hope somebody knowing NB better than me will help you.
    Just in case: JavaFX code goes to .fx files; you cannot embed JFX code in JSP pages.

  • Jsp:include an html file in a subdir

    I have the following directory structure and files
    $CONTEXT/articles.jsp
    $CONTEXT/articles/article1.html
    $CONTEXT/articles/images/image01.gif
    When I browse to
    http://$SERVER/$CONTEXT/articles/article1.html
    the article and its image display fine. The file article1.html references the image via an href to "images/image01.gif".
    However, when I try to access the article from articles.jsp via a <jsp:include page="articles/article1.html" flush="true"/>, the article1.html can't find its image. Obviously this is a problem with the relative path to the image.
    I want to be able to correctly view article1.html from directly browsing it and from including it from articles.jsp. How can I include the article1.html from articles.jsp and somehow allow article1.html to find its images? Is this possible?
    Best regards and thanks,
    John

    I have just tried what you say doesn't work, but I have no problem getting it to work. You may want to check your syntax.
    My directory structure is as follows
    SERVERNAME/CONTENT/jspinclude.jsp
    SERVERNAME/CONTENT/inc/inc.html
    SERVERNAME/CONTENT/inc/images/myimage.gif
    my jsp file looks like this:
    <HTML>
    <HEAD>
    <TITLE>Untitled Document</TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </HEAD>
    <BODY bgcolor="#FFFFFF" text="#000000">
    This is a test of a jsp.include
    <jsp:include page="inc/inc.html" flush="true" />
    </BODY>
    </HTML>
    my html file looks like this
    <HTML>
    <HEAD>
    <TITLE>Untitled Document</TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </HEAD>
    <BODY bgcolor="#FFFFFF" text="#000000">
    <P>This is some sample text</P>
    <P><IMG src="images/myimage.gif"> </P>
    </BODY>
    </HTML>
    This seems to work fine. Perhaps the problem exists somewhere else.
    Rob

  • Parse local HTML files

    Hi,
    I want to parse local HTML files.
    Is there another way than using the Internet Explorer($ie = new-object -com "InternetExplorer.Application";) (without relaying on external packages)?
    At the moment I do something like that:
    $ie = new-object -com "InternetExplorer.Application";
    Start-Sleep -Seconds 1
    $ie.Navigate($srcFile)
    Start-Sleep -Seconds 1
    $ParsedHtml = $ie.Document
    foreach($child in $ParsedHtml.body.getElementsByTagName('table'))
    I still want to have the methods like 'getElementById()' or 'getElementByTagName()'.
    With my current approache, the performance is not realy good and it seems that the iexplorer.exe process is not terminating at the end of the script. 
    Also it seems to have sideeffects with running internet explorer instances (from GUI) - not working to start IE in powershell sometimes.
    Last time I also have a hanging script, not continuing till i manually terminate the iexplorer.exe process.
    The error was:
    Exception calling "Navigate" with "1" argument(s): "The remote procedure call f
    ailed. (Exception from HRESULT: 0x800706BE)"
    At D:\Scripts\Run.ps1:529 char:14
    + $ie.Navigate <<<< ($src)
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation
    so I would prefere a method parsing HTML without IE.

    Hi John Mano,
    Please also try to Parse local HTML files with
    System.Xml.Linq, the script may be helpful for you:
    Using PowerShell to parse local HTML files  
    I hope this helps.                               
    XML?
    I thought HTML is not compatible with xml. 
    And as I don't know LINQ good ... 
    Ok, I'll give it a try. later.
    I can't answer the question about other ways to parse HTML, but to close your IE session you should do the following:
    $ie.Quit() # this terminates the IE process
    $ie = $null # this frees the COM object memory
    Thanks for that.
    I now use that, but seems to be still some IEs open ...
    Maybe a path missing where i dont do it.
    But finally I still get this error. And it is blocking the whole script ...
    Exception calling "Navigate" with "1" argument(s): "The remote procedure call f
    ailed. (Exception from HRESULT: 0x800706BE)"
    At E:\DailyBuild\Scripts\PublishTestResults.ps1:533 char:15
    + $ie.Navigate <<<< ($srcFile)
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ComMethodTargetInvocation

Maybe you are looking for

  • Voice Memo Unreliability

    The voice memo feature on my 3GS is starting to be unreliable--i.e., sometimes it records just fine and other times it is running, but not recording. I installed current software (4.3.2)  and thought that took care of the problem, but it hasn't.  Any

  • Address Bar no longer works

    The address bar no longer works when entering an address, or when selecting from recently visited sites, the only way I can visit a site is to use Google to find the URL and then click on it from the search results

  • PS Report Characteritics for reports created in CJE2

    Hi All, I would like to add BUSINESS AREA as a PS DRILLDOWN type report characteritic. I am using transaction CJE2 to create my own reports. I have already added my enhancement designed user fields by adding them to table TKAF. Business area is alrea

  • Non english characters in commnd line sqlplus

    Guys, In linux, How to see hindi characters in terminal based SQLPLUS? IN GUI based SQLPLUS,i can see hindi characters but in COmmand line SQLPLUS,the hindi rows show empty boxes.

  • How to make changes in stored procedure?

    Few years back i developed an application using oracle 7. now i have to execute the same application but with some modifications using oracle 8i web db. Now the problem is that if i have to make any change in the stored procedures, first i've to drop