Difficult to get good package names with ojspc in automated build

If I understand the documentation for "ojspc" correctly, there is an aspect of its functionality that makes it difficult to have a convenient automated build which can also get good package names for the generated Java source files.
If you don't specify the "-packageName" option, ojspc will build a package name relative to the current directory, including sub-directories. However, specifying "-packageName" will ONLY use that package, and will not create sub-packages associated with sub-directories.
If you don't use the "-packageName" option, then you have to run the build from the root directory of your JSP files. When you're running an automated build with ANT, it's not convenient to do this.
The likely result of this is that I would have to make sure that all of my JSP files are named differently, even if they're in different directories, and use the "-packageName" option to specify a particular package name for all of the generated source files.

After more careful reading, I realized that using the "-appRoot" option (without using "-packageName") makes it possible for an ANT build to generate good package names (with directories).
The following note, however, in the ojspc documentation is kind of odd:
"It is advisable that you run ojspc once for each directory of your JSP application, so files in different directories can be given different package names, as appropriate."
I assume this is referring to using the "-packageName" option. If you don't need to use "-packageName", especially if you have multiple directories of JSP pages, it is much easier to just let ojspc pick the package names.

Similar Messages

  • Get the pc name with domain name and add it to my properties file using commands

    i want to get the pc name with domain name and add it to my properties file using powershell  .
    sid

    function Get-Environment{
    [environment]|Get-Member -Static -MemberType Properties |
    ForEach-Object{
    if($_.Name -ne 'StackTrace'){
    $v=[scriptblock]::Create("[environment]::$($_.Name)").Invoke()
    New-Object PsCustomObject -Property ([ordered]@{Name=$_.Name;Value=$v[0]})
    Get-Environment
    Get-Environment | Out-String | Out-File environment.txt
    ¯\_(ツ)_/¯

  • FM for getting teh file name with path

    Hi guys,
    Is there an fm getting the file name with path given the physical path and file name? Thanks!

    Hi Mark,
    Function Module WS_FILENAME_GET is obsolete, dont use it.
    Use the Method file_open_dialog of  class cl_gui_frontend_services as given below.
    DATA:
        lt_filetable TYPE filetable,
        lf_rc        TYPE i,
        lv_filename(50) TYPE c,
        lv_fileext(3) TYPE c,
        ls_file TYPE file_table,
        lv_file TYPE localfile,
        lv_title TYPE string.
      lv_title = sy-title.
      lv_progname = sy-cprog.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title            = lv_title
          file_filter             = '*.txt'
          multiselection          = abap_false
        CHANGING
          file_table              = lt_filetable
          rc                      = lf_rc
        EXCEPTIONS
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          not_supported_by_gui    = 4
          OTHERS                  = 5.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                   DISPLAY LIKE 'E'
                   WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        EXIT.
      ENDIF.
    * Number of selected filed must be equal to one.
      CHECK lf_rc = 1.
    * Access selected file
      READ TABLE lt_filetable INTO ls_file INDEX 1.
      CHECK sy-subrc = 0.
      lv_file = ls_file-filename.
      SPLIT lv_file AT '.' INTO lv_filename lv_fileext.
    Revert back if you need clarifications.
    Regards
    Karthik D

  • PE 12 Video Quality - does it have to be so difficult to get good results

    I downloaded PE11 trial before PE12 was released, which has since expired, but I have been monitoring this forum to see how PE12 is doing.  I am also trying other editors.
    A common problem theme I see here for PE is the video quality.  With auto settings, so many people are posting that the quality is terrible.  There are suggestions on how to improve quality, but they seem to be very intrusive and time consuming, using other apps to 'prepare' media before bringing into PE.  This add lots of time to ones workflow, especially when trying to simply import some assets, and burn a DVD or create a file.
    It just seems to me that it shouldn't have to be that hard.  Many other editors can look into properties of the imported assets and render with fine quality.  Why can't PE be that easy...or am I expecting too much?

    jmklein
    Thank you for taking the time to expand on your original comments.
    No two situations are alike. And, as I always write, problems with the same symptoms can (often do) have different causes.
    I think that you need to zero in on your specific computer environment and your installation of Premiere Elements in order to make some headway into finding the reason for what you are seeing working in your Premiere Elements in your specific computer environment. Besides settings and the like, there are expectations that may not be consistent with the format resolution and the size of the viewer screen.
    You did not answer my question about your target format. But, from what you wrote, I am assuming that you are addressing yourself to DVD-VIDEO on DVD disc and not AVCHD on DVD or Blu-ray disc format on Blu-ray disc. I get good results with any of the three with Premiere Elements in my Windows computer environment.
    But, after weigning all factors, you feel that you want to be heard by Adobe, then I would suggest that you contact Adobe directly or through the Adobe Feature Request/Bug Report Form
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
    I do not work for Adobe and am not affiliated with it in any way; consequently, my comments are non promotional and are based on many years of working hands on with the versions on my computer at home and helping others with this type of problem.
    Wishing you success in whatever your decision is on video editing software. If Windows Live Movie Maker works for you, then go with that to as far as its feature set can take you.
    ATR

  • How to get the package name of a procedure used in a process flow activity

    Hi all. I'm on OWB 11.2.0.2.0.
    When I used a packaged procedure or function in a mapping operator, I can find out the package.program_unit name by getting the operator's FUNCTION_NAME property. For example,
    OMBRETRIEVE MAPPING '$mapName' OPERATOR '$operName' GET PROPERTIES (FUNCTION_NAME)
    But when the same is used in a process flow activity, I can't find a property name that will give me the same information. I can get the BOUND_NAME, it does not tell me the package name. It must be stored in the activity properties because when you pull up the Synchronize dialog for the activity, it knows the package name.
    Is there a way to get this via an OMBRETRIEVE?
    Thanks.

    ANA, this is exactly what I needed. Thank you so much. I saw REFs also in the OMBRETRIEVE MAPPING/OPERATOR syntax, but went cross-eyed trying to figure out if I could use the same there. The closest I found was GET BOUND_OBJECT.
    Thanks again!

  • When you host a website with business catalyst do you get a domain name with it or do you have to buy one separately?

    When you host a website with business catalyst do you get your own domain name with it or do you have to buy one separately?

    Hi there,
    You need to get a domain yourself.

  • Windows domain how to get full user name with last name.

    Hi:
    I hope someone find the answer, I wrote this question before in the old forum http://forums.sun.com/thread.jspa?threadID=5450216, but I didn't get an answer so I am migrating my question.
    Is there a way to get the full user name from a windows domain? Like the one that you see in the windows start menu on the top.
    I have an application that needs to print a report with the full user name with last name and everything (Example: John F. Doe, not jdoe), so they can sign above the name. Please tell me if there's an api or jar, because the only thing I can get right now is the username. One more thing, it's a stand alone java swing application.
    I will appreciate your help.
    Regards,
    j2gl

    JAAS with the Windows Login Module is about as close as you can get. I don't know exactly how close that is.

  • Getting the constraint name with sql%bulk_exceptions

    Hello folks,
    Is there any way to get the constraint name that was violated using sql%bulk_exceptions.
    I've a parent table and it's two children tables. When I try to delete from parent using forall, save exceptions, I want to know what constraint violated at what iteration of a bulk operation.
    I've following script.
    set serveroutput on
    drop table chld;
    drop table chld2;
    drop table prnt;
    create table prnt(n number primary key);
    insert into prnt select level from dual connect by level<11;
    create table chld(cn number references prnt(n));
    insert into chld select level from dual connect by level<3;
    create table chld2(cn number references prnt(n));
    insert into chld2 select level*3 from dual connect by level<3;
    select * from prnt;
    select * from chld;
    select * from chld2;
    commit;
    declare
      type t_prnt_obj is table of prnt.n%type index by pls_integer;
      t_prnt_tab t_prnt_obj;
      l_exp_cnt integer;
    begin
      select n bulk collect into t_prnt_tab from prnt order by n;
      dbms_output.put_line('t_prnt_tab.count -- '||t_prnt_tab.count);
      forall i in t_prnt_tab.first .. t_prnt_tab.last save exceptions
        delete prnt where n = t_prnt_tab(i);
    exception
      when others
      then
        l_exp_cnt := sql%bulk_exceptions.count;
        dbms_output.put_line('Total exceptions:'|| l_exp_cnt);
        for k in 1 .. l_exp_cnt
        loop
          dbms_output.put_line('Error '||k|| ' - Collection Index: '||sql%bulk_exceptions(k).error_index||' - Error Code: '|| sql%bulk_exceptions(k).error_code||' - Message: '||SQLERRM(- sql%bulk_exceptions(k).error_code) );
        end loop;
    end;I get the output as below:
    t_prnt_tab.count -- 10
    Total exceptions:4
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (.) violated - child record found
    Error 2 - Collection Index: 2 - Error Code: 2292 - Message: ORA-02292: integrity constraint (.) violated - child record found
    Error 3 - Collection Index: 3 - Error Code: 2292 - Message: ORA-02292: integrity constraint (.) violated - child record found
    Error 4 - Collection Index: 6 - Error Code: 2292 - Message: ORA-02292: integrity constraint (.) violated - child record foundInstead, I want to get in output with the constraint_name added. Like below:
    t_prnt_tab.count -- 10
    Total exceptions:4
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (GK.CP_FK) violated - child record found
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (GK.CP_FK) violated - child record found
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (GK.C2P_FK) violated - child record found
    Error 1 - Collection Index: 1 - Error Code: 2292 - Message: ORA-02292: integrity constraint (GK.C2P_FK) violated - child record foundIs it possible, if so how do I get it?
    Thanks in advance for you help.
    Girish

    This is phenomenal, Manik. It surely eased the work am doing at the moment.
    Thanks to you and many more to, Tom!
    Cheers!
    Girish

  • Will a jni header accept a package name with "." in between

    My java class for native function call is included in a package with name like "xxx.yyy.zzz"
    So when I edit the jni class in header file generated to include the package name ,it shows error.
    Is it possible to write jni class for a native function defined in java class which such package name?

    My java class is like this.
    package aaa.bbb.ccc;
    public class Sample{
         static {
              try {
                   System.loadLibrary("WMSMS");
              } catch (UnsatisfiedLinkError e) {
                   System.err.println("WMSMS.dll failed to load. \n" + e);
                   System.exit(1);
         final static native int SendSMS(boolean a, boolean b, String SMSC,String phno, String msg);
         public static int sendSMS(String phoneno, String message){
              int msent = SendSMS(false,true,"",phoneno,message);
              return msent;
    }The header file generated has function like:
    JNIEXPORT jint JNICALL  Java_Sample_SendSMS
      (JNIEnv *, jclass, jboolean, jboolean, jstring, jstring, jstring);So I changed it to
    JNIEXPORT jint JNICALL Java_aaa.bbb.ccc_WMSMS_SendSMS
      (JNIEnv *, jclass, jboolean, jboolean, jstring, jstring, jstring);But then the cpp code showed errors on compiling.
    I dont want to change package name ,since all other classes of the project are included in it and we use this format to easily distinguish the packages (for more clarity) .
    Otherwise using a simple package name works fine and i m able to call the cpp dll with the jni.

  • Is it possible to get object type name  with help of key field?

    can any one tell me is it really possible to get the object type name if i have only key field,
    are there any tables which store the object type names & keyfield.  or there are any functionmodue which gives object type name by entering keyfield.

    Hello,
    If the PO has workflows associated with it, there is a table SWIWIOBJCT which stores details of the workitem, object key , object type details.
    If you input the object key to this table ( For ex: PO number in this case) , it will give you the corresponding object type for the object key for Workitem type F.
    Thanks,
    Sowmya Arni

  • Getting jar file name with wrapper

    Hi,
    I'm using [java service wrapper|http://wrapper.tanukisoftware.org/] to launch my project,
    with the command
    File jarFile = new File(main.class.getProtectionDomain().getCodeSource()
              .getLocation().toString());witch opens the jar file name, this command returns the following
    file:C:/wrapper/../lib/project.jar
    this string raises the exception java.lang.IllegalArgumentException: URI is not hierarchical
    Is there any other why to get the application jar name ?, thanks

    Hi, the is the answer of my previous question
         public static String getJarNameURI () {
             String pathrojar = main.class.getProtectionDomain().getCodeSource()
                     .getLocation().toString();
             if (pathrojar.charAt(5) != '/')
                pathrojar = pathrojar.replace(":", ":/");
             return URI.create(pathrojar).normalize().toString();
    File jarFile = new File(getJarNameURI ());

  • Can't get good MySpace access with Safari on my MacBook

    I'm sure this isn't related to my MacBook, but when I access MySpace the videos and many graphics don't come up. The MacBook is brand new, so I'm sure nothing's wrong with it. Any suggestions on fixing this? Thanks.

    Hi Warren,
    I have a macbook and i use safari to run myspace3, it works fine for me, images load quickly etc. I think it could be one of two problems, check your preferences in safari make sure it isnt set to block images as some sort of security feeature, and secondly make sure you have a good internet connection, slow dial up will make images take forever....if ever to load, my GF has that same problem on her ibook.
    Good luck

  • Package name with "-" is not allowed ?

    Trying to use our domainname "so-fa.de" in our package structure, the package and import statement force a the following compiler error:
    GenericModel.java:47: ';' expected
    package de.so-fa.itm.gui.Model;
    Is "-" the score character not allowed ?
    Is there a preferred mapping (to "_" underscore) ?
    Thank in advance
    Rainer

    Apparently not. The JLS advices you to use under score character in those cases:
    "If the domain name contains a hyphen, or any other special character not allowed in an identifier (3.8), convert it into an underscore."
    http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#40169

  • How to get ear package name form a Stateless SB?

    Hi there,
    I deploy the same Timer based stateless session bean in the same EJB container. It is a mail relay EJB so I store pending mails in a JNDI Vector. I need to have different Vectors as I run several independent J2EE Apps in the container, so I want to give different JNDI names to each Vector.
    How can i know, from inside a Session Bean, which is the .ear file it was deployed from?
    Any other ideas on how to differenciate the same Session Bean deployed several times? (Without invoking a method from a client, of course)
    Thanks,
    Ignacio

    Hi Ignacio,
    EJB application code does not have access to meta-data about its own packaging structure.
    One way to solve your issue is to configure an env-entry containing your globally unique name.
    You can use the same source code for the bean, but have a different version of ejb-jar.xml for
    each incarnation of the timer bean.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How can I get the user name with the sy-uname

    Hi
    I need to display the name of the users instead of sy-uname, in witch table I can select this information ?
    Moderator message - Please search before asking - post locked
    Edited by: Rob Burbank on Oct 7, 2009 10:59 AM

    It's not being authenticated..
    getRemoteUser
    public java.lang.String getRemoteUser()Returns the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated. Whether the user name is sent with each subsequent request depends on the browser and type of authentication. Same as the value of the CGI variable REMOTE_USER.
    Returns:
    a String specifying the login of the user making this request, or null
    I'm assuming it's because it's on your local machine..

Maybe you are looking for