Read the page name

Hi all,
I am new 2 JSP
I need to how to read the page name on the URL
i.e http://localhost:8080/default.jsp
and advice me on wich book to buy for writing JSP pages that access Microsift SQL Server Database.
Regards

What do you mean by read the page name? If you use request.getPathTranslated() it will return the path as seen by the browser. Is that what you're asking for?

Similar Messages

  • Find the page name with page sid?

    Because my top_page is dislpaying the page id instead of the name of the page
    and the output of the id is something like this
    page_id = 2,11,6_23
    Had any idea on where to find the page name?
    Thank you very much for the help

    Hi thank you for the reply...i have seen the path it was only that page name ...actually i want to e more specified like i is at the "TestPage" in the 2 tab call "test 2" is it possible to get the tab name?

  • Getting the page name

    Hi,
    I have a JSP, which is redirected to a servlet. I want to know from which page the request to the servlet is coming from, but am not able to figure that out. If you could please guide me for the same.
    Thanks and Regards,
    Sapan..

    Hi,
    I found the way out.The page name is in the header of the request object. You can get the page name by giving request.getHeader("referer").
    Thanks and Regards,
    Sapan.

  • "hilight" the page name breadcrumb

    I want to "hilight" the page name that I am on in the breadcrumbs section. Does anyone know how I can accomplish this with this code below? And do you have an example?
    <pt:ptdata.currcommunitypagesdata pt:id="communities" /> <pt:logic.foreach pt:data="communities" pt:var="com"> <pt:core.html pt:tag="a" href="$com.url" ><pt:logic.value pt:value="$com.title" /> </pt:core.html> <pt:logic.separator><span style="font-size:5pt; vertical-align:middle; ">|</span></pt:logic.separator> </pt:logic.foreach>
    thanks,
    Greg

    thanks Robert, I wish that the <pt:logic.value pt:value="$com.title" /> would render an ID tag then I would be able to match it with something and then do my css effect.
    Not sure on how to implement your <pt:mytag.ifcurrpage pt:url="com"><b></pt:mytag.ifcurrpage> tag. Do I NEED to do the TagDisplay method in order to have the ifcurrpage tag available or are you saying its already available? I tried the html you sent and it gives me no results.
    I'd like to just run some vbscript or javascript and set the <pt:pagename xmlns:pt="http://www.plumtree.com/xmlschemas/ptui/" /> to a variable and check against the <pt:logic.value pt:value="$com.title" /> but not sure how to go about it if the <pt:logic.value pt:value="$com.title" /> doesnt have an ID tag.
    thanks,
    Greg
    ------- Robert Zhang wrote on 11/9/05 1:55 PM -------Current page URLs have a "currpage" URL component set. Unfortunately, G6 does not ship with a branching Tag that checks for this URL component, but you can easily create an ifcurrpage Tag yourself.Here's an example of how to use one:="$com.url"]<SPAN &#034;ertical-align:middle;>|Example code of the TagDisplay method:String strAttribName = GetTagAttributeAsString(URLTAG);IPTURL ptURL = (IPTURL)GetStateSharedVariable(strAttribName, Scope.TAG);if ( ptURL.GetData(PTURLConstants.KEY_CURRENTMARKER) != null ){ return ProcessTagBody();}where URLTAG is defined aspublic static final RequiredTagAttribute("url", "desc", AttributeType.String);

  • I seem to have grey as a default colour for some websites, can't read the page. any ideas for curing this please?

    When I visit some webpages - example www.thephonebook.bt.com - I cannot read the pages because they are grey and the info fades into the page and is unreadable. Can I change the colour of website pages or is there something else I can do or undo?

    Two suggestions.
    1 This page contains some 'zap' bookmarklets.<br />
    https://www.squarefree.com/bookmarklets/ <br />
    Note the instruction at the top on how to use them.
    Pressing 'zap' on sites with grey print turns it black.
    2 This addon can be used to restyle pages that you use a lot<br />
    [https://addons.mozilla.org/en-US/firefox/addon/2108/ Stylish] <br />
    It's rather technical, but setting up a style rule for this site such as <br />
    <pre>* { color: black ! important ; } </pre>
    can fix it.

  • I am using CC adobe Acrobat to combine multiple pdfs and add page numbers. Mac users can no longer read the page numbers but pc users can.

    I am using CC adobe Acrobat to combine multiple pdfs and add page numbers. As of about 2 weeks ago the mac users can no longer read the page numbers they get a font error message and see only -- where the page information should be. The pc users do not have this same problem. When I replace our regular font (URW Grotesk) with a system font (Verdana) everyone is able to read the page numbers. This is a new issues, I have been creating these documents in the same way for years without a problem. I have been on hold and on and off calls for the last two hours, I keep getting hung up on once I find someone in adobe support to talk to!

    Hi KnoopL,
    Are the Mac users using Preview to view the pdfs or Adobe Reader?
    Regards,
    Rave

  • How to read the whole name of a music title while scrolling down a list of titles? With the new iOs7 Music App there is no more black box showing the entire name!

    How to read the whole name of a music title while scrolling down a list of titles? The old software-app had the function to click for a longer time on a titles beginning letters until a black box revealed the entire name. I miss this function especially for my classical music, because lots of pieces start with similar words. E.g.:
    "Beethoven: Variations On "Ein Mädchen Oder Weibchen", Op. 66 - Var. 1"
    "Beethoven: Variations On "Ein Mädchen Oder Weibchen", Op. 66 - Var. 2"
    Scrolling in a list of title, I can't distinguish the titles, because just the first words are shown followed by: "...".
    That's horrible!

    Or you could include a width to your body style:
    body {
    background-image: url(Logo/sky1.jpg);
    background-position: center center;
    background-attachment: fixed;
    width: 75%;}
    It might work or not depending on your other color scheme.

  • How to read the column name of a table from sap system using C#?

    Hi!!
    I am using SAP .NET connector and creating a windows application.
    Now I wanna read the column name when a table name is given....
    Connection is done, but I don't know the code to read the column names alone...
    Can anyone help me with the code??

    fine!!
    So if i give the table name, which the RFC_READ_TABLE function module have, will it run properly? or i wanna change all the codes in order to support RFC_READ_TABLE function module?
    Because from the beginning I was using BAPI_CUSTOMER_GETLIST function, but my client requirement is to use ERP function module RFC_READ_TABLE, he didn't give any table name also..
    This is my code: What I have to change in this???
    ECCDestinationConfig ECCDestination = new ECCDestinationConfig();
                RfcDestinationManager.RegisterDestinationConfiguration(ECCDestination);
                RfcDestination rfcDest = null;
                rfcDest = RfcDestinationManager.GetDestination(a);
                    RfcRepository repo = rfcDest.Repository;
                    IRfcFunction customerList = repo.CreateFunction("BAPI_CUSTOMER_GETLIST");
                    IRfcTable addressData = customerList.GetTable("AddressTable"));
                    int j = addressData.Metadata.LineType.FieldCount;
                    for (int i = 0; i < j; i++)
                        RfcElementMetadata metadata = addressData.GetElementMetadata(i);
                        listallcolumn.Items.Add(metadata.Name);
    Message was edited by: Jeswin Rebil

  • How do i change the text in a submenu diffrent than the page name? I want it wrap into two lines

    How do i change the text in a submenu diffrent than the page name? I want it wrap into two lines or be a diffrent title but i can't figure out how to make any changes to the text.

    Hello,
    Text in Menu/Submenu canno tbe changed while using menu widget. However, if you use the Manual Menu option, then you can create your own Menu and add the hyperlinks according to your requirement.
    To create Manual Menu, please follow the steps below :
    1) In the Widget palette, go to "Menus" click and drag "Vertical/Hrizontal" into your artboard/workspace
    2) Click on the widget itself to a blue arrow appears to the right
    3) There is a drop down called "Menu Type" set it to "Manual" (as shown in screenshot) :
    4) Now You can create your own Menu and add your own text and hyperlink to  this Menu.
    Hope this helps.
    Regards,
    Sachin

  • Reading the document name.

    Hi all,
    I have a requirement where in a number of documents (.doc,pdf,xls,txt...etc) are placed in a fixed folder in C drive .
    i have to upload these documents to application server.
    The problem here is how to read the file names with file type through a normal report program.
    Help me plz .....
    thanks in advance.

    Use Class CL_GUI_FRONTEND_SERVICES
    Methods DIRECTORY_LIST_FILES  to get file attributes
    data: v_dir_path type string.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
      EXPORTING
        DIRECTORY                   = v_dir_path
       FILTER                      = '.'
       FILES_ONLY                  =
       DIRECTORIES_ONLY            =
      CHANGING
        FILE_TABLE                  = v_files
        COUNT                       = v_count
    EXCEPTIONS
       CNTL_ERROR                  = 1
       DIRECTORY_LIST_FILES_FAILED = 2
       WRONG_PARAMETER             = 3
       ERROR_NO_GUI                = 4
       NOT_SUPPORTED_BY_GUI        = 5
       others                      = 6
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

  • Reading the printer name from the registry

    Hi,
    I am trying to use the following program to get the Printer name from my Registry.. this program has been taken from Forums.
    package yourpackage;
    import java.awt.Graphics;
    import java.awt.print.PageFormat;
    import java.awt.print.Printable;
    import java.awt.print.PrinterException;
    import java.awt.print.PrinterJob;
    import oracle.forms.ui.VBean;
    import oracle.forms.properties.ID;
    public class printDialog extends VBean
    private static final ID PRINTER = ID.registerProperty("PRINTER");
    public printDialog()
    class PrintObject implements Printable
    public int print (Graphics g, PageFormat f, int pageIndex)
    return NO_SUCH_PAGE;
    public Object getProperty(ID id)
    if (id == PRINTER) {
    PrinterJob job = PrinterJob.getPrinterJob();
    job.setPrintable(new PrintObject());
    if (job.printDialog())
    return job.getPrintService().getName();
    } else {
    return null;
    } else {
    return null;}
    This program when compiled gives me the error as
    Error(32,12): method getPrintService() not found in class java.awt.print.PrinterJob
    I did set the project settings from Project-Project Settings and included Oracle Forms Libraries. But I still continue to get the error.
    I understood from the web that I need to put PrintService class which downloaded from the web as part of jnlp.jar
    How should I set this if this is the correct one?
    Early response would be highly appreciated
    Thanks a lot for your time and help
    Narain.

    Narain,
    I could swear I answered this on teh Jdeveloper forum ;-)
    The prin service is part pf Java 1.4, which means that it is not available in JInitiator today. Use the Java Plugin 1.4 and the required classes are present. JNLP stands for Java Network Launching Protocoll and has nothing to do with what you want to achieve.
    In addition, to read the printer names from Forms your jar file has to be signed.
    Frank

  • Script task to read the column names dynamically and create a table in database based on excel column structure

    Hello,
    Can anyone help me out to write a vb.net script.
    I need to read the column names from excel and based on that column names I need to create a table in database(I have more than one sheet in excel).
    For each sheet columns will be changing and should create a table dynamically for each sheet.
    Any help would be appreciated.

    Refer the below script to read columns in each sheet.
    Dim excelfile As String = Dts.Variables("ExcelPath").Value.ToString
    Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;" +
    "Data Source=" + excelfile + ";Extended Properties=Excel 8.0"
    Dim oledbcon As New OleDb.OleDbConnection(connectionstring)
    oledbcon.Open()
    Dim dt As DataTable
    Dim schemaTable As DataTable
    Dim OLEDBCMD As New OleDb.OleDbCommand
    Dim oledbdatareader As OleDb.OleDbDataReader
    Dim columns As String = ""
    dt = oledbcon.GetSchema("Tables")
    Dim TABCOMMAND(20) As String
    Dim TABCOUNT As Integer = 0
    For Each row As DataRow In dt.Rows
    TABCOMMAND(TABCOUNT) = "SELECT * FROM [" & row.Item("TABLE_NAME").ToString & "]"
    OLEDBCMD.CommandText = TABCOMMAND(TABCOUNT)
    OLEDBCMD.Connection = oledbcon
    oledbdatareader = OLEDBCMD.ExecuteReader(CommandBehavior.KeyInfo)
    schemaTable = oledbdatareader.GetSchemaTable()
    For Each myfield As DataRow In schemaTable.Rows
    For Each myproperty As DataColumn In schemaTable.Columns
    If myproperty.ColumnName = "ColumnName" Then
    columns = columns & myfield(myproperty).ToString & ","
    MsgBox(myfield(myproperty).ToString)
    End If
    Next
    Next
    oledbdatareader.Close()
    OLEDBCMD.Dispose()
    Next
    oledbcon.Close()
    Regards, RSingh

  • Break the page name into two lines..

    Hi,
    I am trying to break the page neme into lines.For example Knowledge Management is the name of a page in Detailed Navigation and I want it to be displayed linke Knowledge and Management in two lines.I was just adding the break statement within the page name but was not successful.Any Ideas ??
    Thanks.

    I think you'll need to write your own detailed navigation to do this. There are a set of tags to make this easier...
    Cheers

  • Retrieving the *page* name

    Hello all,
    I have the following scenario in the EP6 SP9:
    "Role A" -> "Role B" -> "Page A"
    "Role A" -> "Role C" -> "Page B"
    where Page A run an iView and Page A and B are deltalinks of another page.
    With a few code lines I can retrieve the roles the user used to call the "Page A" or "Page B", but I can't retrieve the name of the page (it is also a node why can't I retrive it?).
    1) Is there a way to retrieve the page name?
    2) Is there someway to retrieve another page properties?
    I tried the code below, but it seems that it retrieves the information from the java class it is running and dont the page/iview.
    Any help will be appreciated,
    Thanks,
    Alessandro Reichert.
    IPortalComponentContext ctx = request.getComponentContext("pcd:portal_content/com.citrosuco.citrosuco/com.citrosuco.intranet/com.citrosuco.mes/com.citrosuco.OperatorCockpitFolder/com.citrosuco.OperatorCockpitiViews/com.citrosuco.CockpitOperatorURLiView");
    IPortalComponentProfile profile = ctx.getProfile();
    Enumeration e = profile.getProperties();
    while (e.hasMoreElements())
         String str;
         str = e.nextElement().toString();
         response.write(str"<BR>"profile.getProperty(str)+"<BR><BR>");

    Hi Alessandro,
    Here is the exact code I use. It displays the name of each node and the type, starting from the current node and going all the way to the initial node in the selected
    path:
    NavigationEventsHelperService navHelperService = (NavigationEventsHelperService)PortalRuntime.getRuntimeResources().getService(NavigationEventsHelperService.KEY);
    INavigationNode myNode = navHelperService.getCurrentNavNode(request);
    boolean moreNodes = true;
    while (moreNodes) {
         response.write(myNode.getTitle(request.getLocale()));
         try {
              response.write(myNode.getAttributeValue(IPcdAttribute.OBJECT_CLASS).toString());
         } catch (NoSuchAttributeException e) {
              e.printStackTrace();
         response.write ("<BR>");
         if (myNode.getTitle(request.getLocale()).equals("DanRole")) {
              moreNodes=false;
         else {
              myNode = navHelperService.getParentNode(myNode,request);
    The only reason yours would stop before the top is:
    The last node did not have a parent node. Did you check the parent?
    There is a problem in the check that determines whether to stop iterating up the selected path.
    Feel free to send me your code or to post it.
    Daniel

  • Where is the page name stored

    We have a desktop definition in production, but wants to change the name on a couple of Pages while being in production. I've tried to snoop around in the Portal database tables to find the name of the pages, but could only find the Page Label (stored in PF_PAGE_DEFINITION), but not the actual name.
    The portal admin wouldn't allow me to change the page name when the page already is created from a .portal file. Since we're in production, we really don't want to recreate the desktop definition.
    Anyone got a suggestion?
    Trond Andersen, Invenia AS, +4798290811

    All titles are internationalized
    L10N_RESOURCE
    you can find the correct record by tracing through the INTERSECTION_ID

Maybe you are looking for