How to constrain specific IP in jsp ?

Hi, every one,
I use jsp with apache and tomcat on the internet. For the safety reason, I want to constrain some specific IP , I mean, only let some specific IP can use my jsp program on the internet. I did something in the apache config file. It works and only specific IP can see my apache test page. And I did something in tomcat config file similar I did in apache, but it doesn't work and I can see my jsp page anywhere. What's the problem? Any one can give me a main idea? ( OS is redhat 7.1, apache 1.3.19, jdk 1.3.1, tomcat3.2.1)
Thanks in advance.
peter

Thanks, sbaranga.
I have another question. Each time I run my jsp
program, I should input:
http://localhost/examples/myDir/my.jsp
Can I only input:
http://localhost/my.jsp
I mean how to config the tomcat config file?
Thanks.
peterIn your configuration file, there should be a place that lets you specify the name for your webapp, just change it to empty string.
In your case, "example" is the name of your web application, simpley change it to empty string "";
ie.
change name = "example" to name = ""

Similar Messages

  • How to print new line in jsp page

    hi
    how to print new line in jsp page
    thanks

    \n - new line character is in java specific not HTML
    specific.Well, if the correct line separator sequence (by far not always \n) would be used, it does add a new line to the HTML output. Too bad that you don't want to see HTML but formatted text. The BR tag is a formatting element for the displayed text, not a line break in HTML. ;)

  • How to Hightlight the Data in Jsp Page

    How to Hightlight the Data in Jsp Page,
    I am doing doing search page,based on values given search page those are sent to servlet,in servlet based on some conditions if particuler id i am getting then i am redirecting to Respective jsp page with highlight the data from database..
    Thanks in advance...

    "Highlighting data in JSP sounds strange".
    Without looking at your search specific algorithms I feel you are finally going to display a page (HTML content) to user which contains highlighted text. Highlighting is not directly related to server side language you use (JSP, ASP, PHP etc.). This is purely HTML and CSS. However, server side script (such as JSP) should generate HTML content for getting highlight effect.
    Following HTML shows highlighted text using background-color property on span element.
    <html>
      <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
      </head>
      <body>
          <p style="font-size:1.1em">This is a long paragraph which contains <span style="background-color: yellow;">highlighted text</span> and non highlighted text.</p>
      </body>
    </html>Thanks,
    Mrityunjoy
    Edited by: mrityunjoy on 14 Jun, 2010 3:30 AM

  • Specifications for a JSP programmer

    I am looking for a document-template were the designer can write his / her specifications for a JSP programmer.
    Were can I find such a template, or ideas of how to build it ?

    for getting a correct answer to this question you should be a little more specific. What you mean by designer. Is this the graphic artist who designs the looks of the webpage or is it someone who designs the total application where the webpage is a part of.
    If it is the graphic artist there is IMHO no document needed for the programmer. You know how it should look and all the graphics are already in place.
    If the application-archtitect is what you mean by designer, well supply the jsp-programmer whit an ordinary GUI specification.
    But as far as I know there is no template to fill in the blanks for this kind of purpose
    Johan

  • PS HELP how to change my asp to JSP

    <html>
    <body>
    <%
    set conn=Server.CreateObject("ADODB.Connection")
    conn.Provider="Microsoft.Jet.OLEDB.4.0"
    conn.Open(Server.Mappath("profile.mdb"))
    sql="INSERT INTO mms (pnumber,url,expiry,message)"
    sql=sql & " VALUES "
    sql=sql & "('" & Request.Form("pnum3") & "',"
    sql=sql & "'" & Request.Form("url3") & "',"
    sql=sql & "'" & Request.Form("hourtotal3") & "',"
    sql=sql & "'" & Request.Form("choose3") & "')"
    on error resume next
    conn.Execute sql,recaffected
    if err<>0 then
    %>
    <%Response.write("Message can not be send please try again!")%>
    <%else%>
    <%Response.write("Message had been send!")%>     
    <%
    end if
    conn.close
    %>
    </table>
    </table>
    </body>
    <!----how should i change to simple JSP---->

    dont double post its considered rude
    http://forum.java.sun.com/thread.jsp?forum=45&thread=549745&tstart=0&trange=15
    PS you really want us to just convert your asp ?
    Start learning JSP, JDBC and when you have a specific question come back here

  • Urgent....How can i redirect to my jsp page from servlet in init() method..

    How can i redirect to my jsp page from servlet in init() method..Becoz that servlet is calling while server startsup..so im writing some piece of code in init() method..after that i want to redirect to some jsp page ...is it possible?
    using RequestDispatcher..its not possible..becoz
    RequestDispatcher rd = sc.getRequestDispatcher("goto.jsp");
    rd.foward(req,res);
    Here the request and response are null objects..
    So mi question can frame as how can i get request/response in servlet's init method()..

    Hi guys
    did any one get a solution for this issue. calling a jsp in the startup of the servlet, i mean in the startup servlet. I do have a same req like i need to call a JSP which does some data reterival and calculations and i am putting the results in the cache. so in the jsp there in no output of HTML. when i use the URLConnection i am getting a error as below.
    java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:707)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:705)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
    nection.java:519)
    at com.toysrus.fns.alphablox.Startup.callJSP(Unknown Source)
    at com.toysrus.fns.alphablox.Startup.init(Unknown Source)
    at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
    so plz do let me know how to call a jsp in the start up of a servlet.
    Thanks
    Vidya

  • How to enable the EL in jsp page

    hi can u tell 'how to enable the EL in jsp page'?

    *I am getting below exception in tomcat when i inclued +<%@ page isScriptingEnabled="true" isELEnabled="true"%>+*
    org.apache.jasper.JasperException: /index.jsp(1,1) Page directive has invalid attribute: isScriptingEnabled
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
         org.apache.jasper.compiler.JspUtil.checkAttributes(JspUtil.java:311)
         org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:106)
         org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:590)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338)
         org.apache.jasper.compiler.Validator.validate(Validator.java:1700)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  • How to call BPEL process in JSP page

    Hi
    I am new to BPEL.please help me how to call BPEL process in JSP page.
    Thank You...

    Check this thread ....
    How can i call asyncronous BPEL process from Java Class????
    Tom..

  • Can any one give me hint how to create(dsplay) calendar in jsp 1.2

    can any one give me hint how to create(dsplay) calendar in jsp 1.2
    friends
    i wants to display calendar (not the date) in tabular way please give me hint how to create it

    Hi,
    i would just add my question cos it looks similar , how can i add calendar of the whole year and let the user browse and select it
    thanX in advance

  • How to open mapquest from a jsp page with address loaded in struts?

    Can someone plz tell me about how to open mapquest from a jsp with address preloaded (i.e taken from jsp fields)? I am using struts.

    http://maps.google.com/maps?q=
    add the query to the end of it. Makes simple.

  • How to access java method in JSP

    Hi all,
    I need to access java class (abstract portal component) method doContent() in a JSP which is under PORTAL-INF/jsp folder.
    I did
    <%@ page import = "com.mycompany.Aclass" %>
    <%com.mycompany.Aclass a = new com.mycompany.Aclass (); %>
    Aclass is coming as autofill/prepopulated with cntrl+space
    Till this time, it is working. no errors. But when I do
    a.
    a. (a dot) no methods are populating (autofill..cntrl+space) or If I forcebly add method a.doContent(req,res)... at runtime its giving error.
    It's not only with doContent method... Its with any simple methods in that class or any other class.
    (Other than doContent method in the APC java class are prepopulating/autofilling but giving error in runtime)
    Can anyone help me... how to access java method in JSP.
    I already gone through many SDN forum post... and implemented too---but no use I refered below forum thread
    Retrieve values from Java class to JSP
    URGENT! How to call a java class from JSP.
    Calling a java method from jsp file -
    this thread is same as my issue
    Thanks,
    PradeeP

    1st. The classes must be in packages. 2nd, the package that they are in must be under the WEB-INF/classes directory. 3rd Look on google and/or this site for web application deployment

  • How to use IBatis paging in jsp?

    I'm a new comer in IBatis.If I query the database using the method "executeQueryForList" how to display the record in jsp (for example 10 record) and display next 10 record? I means how to create page number in jsp for user click?
    If someone used it please help me.
    It is best give me an example.
    Thks

    Any idea?
    But I think the method "executeQueryforPaginatedList" will be better.Because it has associated method "nextPage(), previousPage(), gotoPage(),isMiddlePage(), isLastPage(), isNextPageAvailable(),".
    What I want to know is how to display the page number according to the resultset.For example,If I want to display this in jsp:
    "<<back 1 2 3 4 last>>>"
    How to display the number "1,2,3,4"?
    I means that if I query 10 record per time how to display it in jsp?
    :(

  • How to use session object in jsp

    hi all
    marry christmas
    can anyone plz tell me how to use session obect in jsp
    rachna
    Message was edited by:
    rachna_arora82

    hi rachna,
    JSP has a default(implicit) session object...... use the getSession(true) method on the session object and then going u can either get or set attributes depending on the requirement
    That was in general and now with the issue u have got..... what u can do is that the u can create session for every user who logs in and when he/she tries to login again then u can probably check for the existing session object in the JSP and perform the logic as required..... any clarifications plzzzzzzz let me know
    Thanks n Regards
    Naveen M
    Message was edited by:
    Novice_inJAVA
    Message was edited by:
    Novice_inJAVA

  • How to use  SSL Technology in JSP.

    Can anybody Tell me that How to use SSL Technology in JSP ?
    I am using Apache Tomcat 5.0.28 Server.
    How to configure the Tomcat server so that it will access any web application supported by Tomcat via SSL ?
    Thank you very much in advance.

    The JSP does not need to know that the request is coming over SSL. If the application must be over SSL, but the server also allows non-SSL communication, then, like I said, you need to build in a Filter that will check if the incoming request is an https or http request and redirect to the https url if the request was http. And you can do that using the method listed in the previous post. As far as setting up the SSL certificate for Tomcat to use, refer to the Tomcat Documentation that comes with the server. Other than those two things, you don't need to know anything else about SSL inorder to run an SSL application through a Tomcat server (or any other enterprise server either, for that matter), but do an internet search for SSL and maybe one or two other keywords that apply to your situation and you should find plenty that will help.

  • How to use custom tag in jsp

    sir
    plz tell me how to use custom tag in jsp.plz describe it.
    i will be thankful to u

    Do you want to use taglibs or develop custom tags? Either way take a look at these:
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html
    http://www.stardeveloper.com/articles/display.html?article=2001081301&page=1
    http://www.onjava.com/pub/a/onjava/2000/12/15/jsp_custom_tags.html
    http://jakarta.apache.org/taglibs/tutorial.html
    http://www.ibm.com/developerworks/edu/j-dw-java-custom-i.html
    http://www.herongyang.com/jsp/tag.html

Maybe you are looking for

  • RTF not formating correctly

    Hi everyone I imported an RTF document and inlcuded it in my splash screen. I have some lingo that updated the ducumented when the EXE is ran: on beginsprite me      member("Lawyer_bio").fileName = the moviePath & "Lawyer_bio.rtf"      member("Lawyer

  • How to unlock a carrier locked iPad 1?

    I have a iPad that was bought on contract on Orange. I have a 3 sim and when I try it, I get a message in iTunes "The Sim card inserted in this iPad does not appear to be supported" I am guessing it is carrier locked, I have found a few people on the

  • Sequence Settings Missing General Tab

    Hi, I'm trying to modify the frame size of a project I've started in FCE HD. I've read the manual and several dozen forum threads, and I understand that this is done in the "Sequence settings" window. But my sequence settings window doesn't have a 'G

  • MM-SUS Limitations

    Dear Experts, I have observed following limitations in MM-SUS. please let me know my assumptions are correct or not? Apart from that if any limitations in MM-SUS then please let me know. 1) Purchase Orders in MM SUS Scenario must always have POR & AS

  • Price zero in material master:MM01

    When I create a material , system is asking moving avg price, std price (Accounting 1 view). It is mandatory. In some cases I want to maintain price as zero which system is not allowing. How to make system to accept proce as zero for a material.