Hi, how to use URL encoding in jsp

hi, how to apply URL encoding in jsp for a string, could u pls suggest some ideas to use URL encoding in jsp
thank you in advance

hi, thnx for the reply, but my problem is to use url encoding method
i would u like to know how to represent in jsp program i have asp code some thing like this
href='/project/tel_number.asp?team=<%=DbRecTeam("id")%>&name=<%=Server.URLEncode(DbRec("name"))%>'
i would like to know how replace that Server.URLEncode stmt in jsp, could u pls suggest some equivalent method for the above stmt
thanx in advance

Similar Messages

  • 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 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 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

  • Oepe-12.1.2.1-kepler how to use ADF Templates in JSP page

    Hi all,
        I use oepe 12.1.2.1 kepler 4.3 and creating JSP page but I can't see any ADF Rich Faces Page in JSP Templates Page of Preferences Dialog. How to use ADF Templates in JSP page?
    Thanks,
    Thomas

    Select the JSP Templates link. Is the ADF Rich Faces Page template listed? Refer Creating the Login Page/4.
    Introduction to the Oracle Enterprise Pack for Eclipse (OEPE) IDE

  • How to use protected method in jsp code

    Could anyone tell me how to use protected method in jsp code ...
    I declare a Calendar class , and I want to use the isTimeSet method ,
    But if I write the code as follows ..
    ========================================================
    <%
    Calendar create_date = Calendar.getInstance();
    if (create_date.isTimeSet) System.out.println("true");
    %>
    ============================================================
    when I run this jsp , it appears the error wirtten "isTimeSet has protected access in java.util.Calendar"

    The only way to access a protected variable is to subclass.
    MyCalendar extends Calendar
    but I doubt you need to do this. If you only want to tell if a Calendar object has a time associated with it, try using
    cal.isSet( Calendar.HOUR );

  • How to use "url.openStream()" . What this function does?

    how to use "url.openStream()" . What this function does?
    Edited by: sahil1287 on Apr 16, 2009 10:02 PM

    http://java.sun.com/javase/6/docs/api/java/net/URL.html#openStream()
    http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html

  • How  to use url iview???

    how  to use url iview???
    HI all
    I need to use url iview as back button in the same page with saptransaction iview.
    url iview to used as back button to the home page.
    pl suggeest how to use url ivew....what sort of properties need to be  used.

    HI chander
    thank u for ur response
    I have done an  aplication in which  i have called sap transsaction ivew usind quick link property in .html(page) language.
    where we will be fetching saplogon server using this sap trans saction ivew into the portal frame work  .
    when i loging into the server and log off  with in the portal frame work i am not able to go to my aplication home page. since back/ forward link are disabled.
    atleast i want know how to enable those links.
    or else
    i thought to use url ivew along with sap transaction ivew with a  same page with diffrent layouts.but that is also fine.
    and one   more option  was
    i thought it to be used as pop up as so that when user  login and log off into the server  they will close  that seperate window.
    for that i have set the  ivew property
    "launch in a new window property As : display in a seperate head less portal window"
    but even that is also not working.
    i dont know y  that property is not working
    finally i have coded with java script , now i am able to open the portal in a seperate window but with headed portal.
    for that i have coded some thing like below mentioned.
    problem here is still i am getting the headed portal
    but i want head less portal.
    here headless in the sence i want it like the preview of the ivew.
    please help me in this regard how to get the head less portal when i click on the link.
    Regards
    Gayathri

  • How to use bean:write inside jsp:include ?

    I got a problem about JSP's syntax. The following is my code:
    <%@ include file="<bean:write name="HelloForm" property="target" />"%>
    The double quotes inside bean:write is my problem. Could you please teach me how to use bean:write within JSP's include? Thank you!

    http://java.sun.com/products/jsp/syntax/1.2/syntaxref12.html
    Include Directive vs <jsp:include>
    The include directive <%@include %> is done at page translation/compile time.
    It effectively pastes in a static file, and then compiles the JSP as if it was all one file.
    As such, you cannot provide a runtime expression to it.
    To do runtime inclusion, you need to use the <jsp:include> tag which does except runtime parameters.
    <%String test = request.getParameter("pageInfo");%>
    <%String link = test + ".jsp"; %>
    <jsp:include page="<%= link %>" %>Unfortunately you can't use the tag with a bean:write tag as well, you can only use runtime expressions, not tag. So you have to do the include with
    <jsp:include page="<%= HelloForm.getTarget() %>" />
    Cheers,
    evnafets

  • How to use mxml in a jsp file?

    I'm trying to use flex in a .jsp file. I followed the
    suggestion that I use the Flex 2 Tag library as suggested by this
    link:
    http://labs.adobe.com/wiki/index.php/Flex_2_Tag_Library_for_JSP#Download_and_Installation
    but I couldn't find it. I also downloaded LiveCycle Data Services
    ES but couldn't find the flex-bootstrap.jar.
    I have a simple example:
    <!--<%@ taglib uri="FlexTagLib" prefix="mm" %>-->
    Use the <mxml> tag to insert a Flex application in an
    existing JSP page. The following example shows the <mxml> tag
    with the source attribute to include an external MXML file:
    <mm:mxml source="CustomerServiceChat.mxml"/>
    Alternatively, you can use the <mxml> tag with inline
    MXML source code, as the following example shows:
    <mm:mxml>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    xmlns="*">
    <mx:Text label="Hello World">
    </mx:Application>
    </mm:mxml>
    I also added the following code in my web.xml:
    <taglib>
    <taglib-uri>FlexTagLib</taglib-uri>
    <taglib-location>/WEB-INF/lib/flex-bootstrap.jar</taglib-location>
    </taglib>
    and obviously I get an error because I don't have the
    flex-bootstrap.jar file. Please let me know how this can be
    corrected. Thanks in advance!

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    Adobe - Developer Center : Flex quick start guide for PHP
    developers:
    Apr 30, 2007 ... In this example, I changed the result data
    type to XML with E4X support by setting .... In Flex you would
    download a file using this code:
    Link:
    http://www.adobe.com/devnet/flex/articles/php_getstarted.html
    2d. Tutorial - Flex 3 Getting Started - Adobe Learning
    Resources:
    See Calling XML Web Services over the Web Using the Web
    Service References ... For information on integrating PHP and Flex
    using AMF to encode the data,
    Link:
    http://learn.adobe.com/wiki/display/Flex/2d.+Tutorial
    Mike Potter: Flex and PHP - A simple sample:
    I have other example with PHP and MySql and give the same
    error, and a example .... Flex Data Services... I choose None (???)
    because I work with php and
    Link:
    http://blogs.adobe.com/mikepotter/2006/02/flex_and_php_a_1.html
    Adobe - Developer Center : Transmitting data between Flex and
    PHP:
    Sep 4, 2007 ... Now that the user interface is set up and
    ready to go you can add the HTTP services to go ask for the data
    from the PHP code. In Flex you
    Link:
    http://www.adobe.com/devnet/flex/articles/flex_php_json.html
    Integrating Adobe Flex and PHP:
    Mar 1, 2006 ... The first step is to download Flex Builder
    2.0 from the Adobe labs ... For example, you could use this same
    PHP script to pass data to a
    Link:
    http://devzone.zend.com/article/11-Integrating-Adobe-Flex-and-PHP
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • How to use session variable in JSP function  & How to use both JSP  Servlet

    Hi,
    I am new to JSP and servlets
    Still I am devloping a website in JSP. I am not mixing JSP with servlets, but I do create Java files for bean, logic and database works.
    I try to keep the hard coding part out of JSP.
    I dont how to use both JSP and Servlets in combination.
    Hence If needed I write some functions in JSP.
    but it gives me error
    +<%! public void abc()+
    +{+
    int intUserId = Integer.valueOf((Integer) session.getAttribute("MySession_UserID"));
    +}+
    +%>+
    Saying cannot find symbol session
    1) So can u please tell how can I access session variables within JSP function
    2) And also give me some links/tutorials about useing both JSP and Servlets in combination.
    Thanks
    Venkat

    The application architecture when you use Servlets and JSP in a standard MVC pattern is explained here (under the heading "Integrating Servlets and JSP Pages") and here ...

  • How to use dreamweaver files in jsp?

    Hello All
    I am developing jsp files in which i want to use macromedia dreamweaver files i.e flash button and flash text. I am building jsp files in JBulider. Can anyone tell me how to use or bring in these dreamweaver files in the JSP files? Will be greatful for any help given.
    Arshad

    You should be able to just bring the files into DreamWeaver. It should edit the HTML part of the JSP just fine.

  • How to use standard tags in JSP

    Hi all,
    Just wanted to know how to use standard tags of endeca in JSP ... say for example to display Dimension Name using standard tags.
    Thanks
    --Sam                                                                                                                                                                                                                                                                                                                       

    i was just checking whether we can use endeca TAG'S ( typo mistake in my earlier post not the JSTL standard library )....in my JSP
    We cannot use endeca TAG ...as they are for different purpose.
    Sameer

  • How to use connection pooling in jsp?

    I'm new to world of JSP. I'm developing web application using Oracle 8i and JSP to implement it. I'm using jakarta-tomcat server for this purpose.
    I'll frequently access the database. so I want to use the connection pooling.
    Can anybody explain the simple procedure to use it
    thanx

    Hello syyuen,
    Please help me, here iam sending u my server.xml , web.xml and servlet
    application. I put classes12.jar in tomcat/common/lib. and above servlet
    class application under tomcat/webapps/root/web-inf/classes
    and this is a simple servlet program for getting connection from the
    connection pool of tomcat using tyrex..
    my oracle database name is "myuser" and password is "mypass"
    either u check my server.xml or tell me where under which tag should i
    place <Resource...> tag in server.xml and should i need to modify any
    other places..??
    server.xml
    <Server port="8005" shutdown="SHUTDOWN" debug="0">
              <!-- Tomcat Stand-Alone Service -->
    <Service name="Tomcat-Standalone">
         <!-- Non-SSL HTTP/1.1 Connector on port 8080 -->
    <Connector className="org.apache.catalina.connector.http.HttpConnector"
    port="8080" minProcessors="5" maxProcessors="75"
    enableLookups="true" redirectPort="8443"
    acceptCount="10" debug="0" connectionTimeout="60000"/>
              <!-- AJP 1.3 Connector on port 8009 -->
    <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
    port="8009" minProcessors="5" maxProcessors="75"
    acceptCount="10" debug="0"/>
              <!-- Top level container in our container hierarchy -->
    <Engine name="Standalone" defaultHost="localhost" debug="0">
         <!-- Global logger unless overridden at lower levels -->
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="catalina_log." suffix=".txt"
    timestamp="true"/>
         <!-- Because this Realm is here, an instance will be shared globally
              <Realm className="org.apache.catalina.realm.MemoryRealm" /> -->
                   <!-- Replace the above Realm with one of the following to get a Realm
                   stored in a database and accessed via JDBC -->
                   <!-- <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
                        driverName="org.gjt.mm.mysql.Driver"
                        connectionURL="jdbc:mysql://localhost/authority?user=test;password=test"
                        userTable="users" userNameCol="user_name" userCredCol="user_pass"
                        userRoleTable="user_roles" roleNameCol="role_name" />
                   -->
    <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
              driverName="oracle.jdbc.driver.OracleDriver"
                   connectionURL="jdbc:oracle:thin:@oracle:1521:ORCL"
    connectionName = "mail"
    connectionPassword = "mail"
              userTable="users" userNameCol="user_name" userCredCol="user_pass"
                   userRoleTable="user_roles" roleNameCol="role_name" />
                        <!-- <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
                        driverName="sun.jdbc.odbc.JdbcOdbcDriver"
                        connectionURL="jdbc:odbc:CATALINA"
                        userTable="users" userNameCol="user_name" userCredCol="user_pass"
                        userRoleTable="user_roles" roleNameCol="role_name" />
                        -->
                   <!-- Define the default virtual host -->
    <Host name="localhost" debug="1" appBase="webapps" unpackWARs="true">
         <Valve className="org.apache.catalina.valves.AccessLogValve"
         directory="logs" prefix="localhost_access_log." suffix=".txt"
         pattern="common"/>
    <Logger className="org.apache.catalina.logger.FileLogger"
    directory="logs" prefix="localhost_log." suffix=".txt"
         timestamp="true"/>
                   <!-- Tomcat Root Context -->
                   <!-- <Context path="" docBase="ROOT" debug="0"/> -->
                   <!-- Tomcat Manager Context -->
    <Context path="/manager" docBase="manager" debug="0" privileged="true"/>
    <!-- MY CONTEXT HERE -->
         <Context path="/localhost" docBase="localhost" debug="0" reloadable="false" override="true">
              <Resource name="jdbc/myConnection" auth="SERVLET" type="javax.sql.DataSource"/>
              <ResourceParams name="jdbc/myConnection">
                   <parameter><name>user</name><value>myuser</value></parameter>
                   <parameter><name>password</name><value>mypass</value></parameter>
                   <parameter><name>driverClassName</name><value>oracle.jdbc.driver.OracleDriver</value></parameter>
                   <parameter>
                        <name>url</name>
                        <value>jdbc:oracle:thin:@oracle:1521:ORCL</value>
                   </parameter>
                   <parameter>
                        <name>maxActive</name>
                        <value>32</value>
                   </parameter>
                   <parameter>
                        <name>maxIdle</name>
                        <value>10</value>
                   </parameter>
              </ResourceParams>
    <!-- END OF MY Context, Oracle username=myuser,password=mypass -->
    <!-- i pasted this context from somebody . should i need whole context or resource name in that...???? -->
    <!-- Tomcat Examples Context
    <Context path="/examples" docBase="examples" debug="0" reloadable="true" crossContext="true">
    -->
    <!--
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_examples_log." suffix=".txt" timestamp="true"/>
         <Ejb name="ejb/EmplRecord" type="Entity" home="com.wombat.empl.EmployeeRecordHome" remote="com.wombat.empl.EmployeeRecord"/>
    <Environment name="maxExemptions" type="java.lang.Integer" value="15"/>
    <Parameter name="context.param.name" value="context.param.value" override="false"/>
    <Resource name="jdbc/EmployeeAppDb" auth="SERVLET" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/EmployeeAppDb">
    <parameter><name>user</name><value>sa</value></parameter>
    <parameter><name>password</name><value></value></parameter>
    <parameter><name>driverClassName</name><value>org.hsql.jdbcDriver</value></parameter>
    <parameter><name>driverName</name><value>jdbc:HypersonicSQL:database</value></parameter>
    </ResourceParams>
    <Resource name="mail/Session" auth="Container" type="javax.mail.Session"/>
    <ResourceParams name="mail/Session">
    <parameter>
    <name>mail.smtp.host</name>
    <value>localhost</value>
    </parameter>
    </ResourceParams>
    -->
    </Context>
    </Host>
    </Engine>
    </Service>
         <!-- Define an Apache-Connector Service -->
    <Service name="Tomcat-Apache">
    <Connector className="org.apache.catalina.connector.warp.WarpConnector"
    port="8008" minProcessors="5" maxProcessors="75"
    enableLookups="true" appBase="webapps"
    acceptCount="10" debug="0"/>
                   <!-- Replace "localhost" with what your Apache "ServerName" is set to -->
    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
    name="Apache" debug="0">
                   <!-- Global logger unless overridden at lower levels -->
    <Logger className="org.apache.catalina.logger.FileLogger"
    prefix="apache_log." suffix=".txt"
    timestamp="true"/>
                   <!-- Because this Realm is here, an instance will be shared globally -->
    <Realm className="org.apache.catalina.realm.MemoryRealm" />
    </Engine>
    </Service>
    </Server>
    web.xml
    <web-app>
    <servlet>
    <servlet-name>conServlet</servlet-name>
    <servlet-class>conServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>conServlet</servlet-name>
    <url-pattern> /conServlet </url-pattern>
    </servlet-mapping>
    <resource-ref>
    <description> Resource reference to java.sql.Connection
    factory defined in server.xml
    </description>
    <res-ref-name>jdbc/myConnection</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    servlet application
    DataSource ds = (DataSource) new InitialContext().lookup("java:comp/env/jdbc/myConnection");
    conn = ds.getConnection();
    out.println("conn : " + conn);

  • How to use ejb control in jsp

    hi,
    I created an entity bean and I created an ejb control. Now I would like to
    use this ejb control inside of a jsp (no page flow).
    When I use the ejb without the control I do the follwing steps :
    - get the local home
    - call finder methode
    - get the local object
    - call getMethod() and display content
    Can someone please post an example how to use the netui-data tags to do this
    steps or do I have to use the controls in a total different way?
    Can someone please tell me how to use the ejb control inside a normal java
    class?
    Michael

    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

  • Open-PO LSMW

    I have a LSMW for open PO.When i upload the PO the system is taking the price which is given in the info record.It is ignoring the Price given in the LSMW template. This what which is written in the program, Source:  POSIZIONI-NET_PRICE (Net price in

  • :( Second R/3 S/M configuration error in content administrator  :O

    Hi I have a WebAS 640 Java Preview installation.  I have successfully configured two R/3 system in SLD.  But when trying to create the corresponding JCo connections in the content Administrator, it works only for one R/3 system.  It does not even pin

  • No quicklook/preview for documents created with Pages 5.5!

    Before opening files and find you can hit the spacebar and have a preview of most of the file types. This always worked well with Pages until the newest version 5.5. Now I can only preview the files created with older versions of Pages. Every file cr

  • Setting JScrollPane position

    I have a JScrollPane which has a JList (of sorted strings) as its view. When the list has the focus and the user presses a key, the first item that starts with the pressed key is selected. But the the JScrollPane does not scroll to this position and

  • Slideshow from XML in AS3

    I'm WAY new to AS3 and I'm looking to create a slideshow driven by XML. Its a very simple XML file that can have 2 to 5 images in it. I can get the images to load in, but am having problems on the Event.COMPLETE function I created. I can't seem to re