sponsored links

Collapse

Announcement

Collapse
No announcement yet.

I'm not asking for a code Monkey but.....

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • I'm not asking for a code Monkey but.....

    Does anyone have an example of a CGIDEV2 index page uisng css and IFS instead of physical file members?


    thanks in advance
    Jamie
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

  • #2
    Re: I'm not asking for a code Monkey but.....

    Originally posted by jamief
    Does anyone have an example of a CGIDEV2 index page uisng css and IFS instead of physical file members?


    thanks in advance
    Jamie
    lazy!!!
    ETA: this was written in the stone age so overlook the horrible code...
    Attached Files
    Last edited by tomholden; May 25th, 2012, 10:26 AM.
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: I'm not asking for a code Monkey but.....

      Thanks for the help Tom...

      okay here is the RPG code (I just copied from a web template on the web)

      PHP Code:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"                                                                                                                                                                            
      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">                                                                                                                                                                 
      <
      head>                                                                                                                                                                                                                              
       <
      title>Media</title>                                                                                                                                                                                                               
        <
      link rel="stylesheet" href="../style.css" type="text/css" charset="utf-8" />                                                                                                                                                     
                                                                                                                                                                                                                                          
      </
      head>                                                                                                                                                                                                                             
      <
      body>                                                                                                                                                                                                                              
        <
      div id="wrapper">                                                                                                                                                                                                                
          <
      h1>...The <strong>Worldwide</strongMedia...</h1>                                                                                                                                                                             
          <
      div id="top-nav">                                                                                                                                                                                                              
            <
      ul>                                                                                                                                                                                                                          
              <
      li><a href="http://www.freewebsitetemplates.com">faq</a> | </li>                                                                                                                                                           
              <
      li><a href="http://www.freewebsitetemplates.com">site maps</a></li>                                                                                                                                                        
            </
      ul>                                                                                                                                                                                                                         
          </
      div>                                                                                                                                                                                                                          
          <
      div id="mmagic"> </div>                                                                                                                                                                                                        
          <
      div id="header"> </div>                                                                                                                                                                                                        
          <
      div id="spacer"> </div>                                                                                                                                                                                                        
          <
      div id="body">                                                                                                                                                                                                                 
            <
      div id="left">                                                                                                                                                                                                               
              <
      div id="nav">                                                                                                                                                                                                              
                <
      ul>                                                                                                                                                                                                                      
                  <
      li class="drk"><a href="http://www.freewebsitetemplates.com">Home</a></li>                                                                                                                                             
                  <
      li><a href="http://www.freewebsitetemplates.com">About Us</a></li>                                                                                                                                                     
                  <
      li><a href="http://www.freewebsitetemplates.com">Services</a></li>                                                                                                                                                     
                  <
      li><a href="http://www.freewebsitetemplates.com">Contact us</a></li>                                                                                                                                                   
                </
      ul>                                                                                                                                                                                                                     
                <
      div class="clear"> </div>                                                                                                                                                                                                
              </
      div>                                                                                                                                                                                                                      
              <
      div id="visit">                                                                                                                                                                                                            
                <
      h2>Visit Us...</h2>                                                                                                                                                                                                      
                <
      p>Don't forget to check <a href="http://www.freewebsitetemplates.com">                                                                                                                                                   
                <p>You can remove any link to our websites from this template you'
      re free                                                                                                                                                 
                
      <class="more"><a href="http://www.freewebsitetemplates.com">more...</a></p>                                                                                                                                             
              </
      div>                                                                                                                                                                                                                      
              <
      div id="subs">                                                                                                                                                                                                             
                <
      div id="subs-left">                                                                                                                                                                                                      
                  <
      h3>Compant Information &ampProfile</h3>                                                                                                                                                                              
                  <
      p>Even more websites all about website templates on                                                                                                                                                                    
                  
      <h3>Company News</h3>                                                                                                                                                                                                   
                  <
      p>If you're looking for beautiful and professionally made                                                                                                                                                              
                  <h3>Company Services</h3>                                                                                                                                                                                               
                  <p>This is just a place holder so you can see how the                                                                                                                                                                   
                </div>                                                                                                                                                                                                                    
                <div id="subs-right">                                                                                                                                                                                                     
                  <h3>Browse</h3>                                                                                                                                                                                                         
                  <ul>                                                                                                                                                                                                                    
                    <li>                                                                                                                                                                                                                  
                      <h4>Business &amp; Money</h4>                                                                                                                                                                                       
                      <p>This is just a place holder so you can see how the site                                                                                                                                                          
                    </li>                                                                                                                                                                                                                 
                    <li>                                                                                                                                                                                                                  
                      <h4>Entertainment</h4>                                                                                                                                                                                              
                      <p>This is just a place holder so you can see how the site                                                                                                                                                          
                    </li>                                                                                                                                                                                                                 
                    <li>                                                                                                                                                                                                                  
                      <h4>Society &amp; Culture</h4>                                                                                                                                                                                      
                      <p>This is just a place holder so you can see </p>                                                                                                                                                                  
                    </li>                                                                                                                                                                                                                 
                  </ul>                                                                                                                                                                                                                   
                </div>                                                                                                                                                                                                                    
              </div>                                                                                                                                                                                                                      
            </div>                                                                                                                                                                                                                        
            <div id="right">                                                                                                                                                                                                              
              <div id="right-i">                                                                                                                                                                                                          
                <h2>Media Coverage</h2>                                                                                                                                                                                                   
                <p>This is a template designed by free website templates                                                                                                                                                                  
                <h3>News</h3>                                                                                                                                                                                                             
                <img src="images/pic_1.jpg" width="103" height="79" alt="Pic 1" class="left" />                                                                                                                                           
                <p>If you'
      re having problems editing the template please don't                                                                                                                                                            
                <p class="more"><a href="http://www.freewebsitetemplates.com">more...</a></p>                                                                                                                                             
                <h3>Sports</h3>                                                                                                                                                                                                           
                <img src="images/pic_2.jpg" width="103" height="79" alt="Pic 2" class="left" />                                                                                                                                           
                <p>This is a template designed by free website templates for you for                                                                                                                                                      
                <p class="more"><a href="http://www.freewebsitetemplates.com">more...</a></p>                                                                                                                                             
                <h3>Television</h3>                                                                                                                                                                                                       
                <img src="images/pic_3.jpg" width="103" height="79" alt="Pic 3" class="left" />                                                                                                                                           
                <p>If you'
      re having problems editing the template please don't hesitate to                                                                                                                                                
                <p class="more"><a href="http://www.freewebsitetemplates.com">more...</a></p>                                                                                                                                             
              </div>                                                                                                                                                                                                                      
            </div>                                                                                                                                                                                                                        
            <div class="clear"> </div>                                                                                                                                                                                                    
          </div>                                                                                                                                                                                                                          
          <div id="copyright">                                                                                                                                                                                                            
            <p>Copyright statement goes here. All rights reserved</p>                                                                                                                                                                     
          </div>                                                                                                                                                                                                                          
        </div>                                                                                                                                                                                                                            
      </body>                                                                                                                                                                                                                             
      </html> 
      CGIDEV2 folder looks like this

      Click image for larger version

Name:	Noname.jpg
Views:	1
Size:	12.4 KB
ID:	126522

      You have to trust that my images are in the image folder
      and I left the CSS flapping in the wind.

      I get this when processing

      Click image for larger version

Name:	Noname.jpg
Views:	1
Size:	107.6 KB
ID:	126523


      Its not seeing the css or the images..
      links are:

      CSS <link rel="stylesheet" href="../style.css" type="text/css" charset="utf-8" />
      and images :

      Click image for larger version

Name:	Noname.jpg
Views:	1
Size:	265.4 KB
ID:	126524


      I would guess first I have no idea what Im doing & second the config is incorrect

      config:
      PHP Code:
        1    #=========================================================================
        
      2    # APACHE directives to run CGIDEV2 base examples
        
      3    #
        
      4    # To start the HTTP instance for CGIDEV2,
        
      5    # execute the following command:
        
      6    # STRTCPSVR SERVER(*HTTP) HTTPSVR(CGIDEV2)
        
      7    # Then, run command WRKACTJOB SBS(QHTTPSVR) and make sure that more than
        
      8    # one CGIDEV2APA is running.
        
      9    # If not, the CGIDEV2 HTTP instance failed being started.
        
      10    # You should then look in the joblogs for CGIDEV2APA jobs and find out
        
      11    # what the error was.
        
      12    #
        
      13    # To run CGIDEV2, type the following in the location line of your browser:
        
      14    # http://yourAS400IpAddr:8015/
        
      15    #
        
      16    #=========================================================================
        
      17    # PART 1
        
      18    #=========================================================================
        
      19    ServerRoot /cgidev2
        20    Listen 80
        21    DefaultType text
      /html
        22    
      # CGI
        
      23    CGIConvMode %%EBCDIC/EBCDIC%%
        
      24    ThreadsPerChild 53
        25    MaxCGIJobs 100
        26    StartCGI 2 QTMHHTP1
        27    Timeout 120
        28    
      # PERSISTENT CGI
        
      29    MaxPersistentCGI 5
        30    CGIRecyclePersist on
        31    PersistentCGITimeout 60
        32    
      # PERFORMANCE
        
      33    DynamicCache on
        34    CacheLocalSizeLimit 25000
        35    FRCAEnableFileCache On
        36    FRCACacheLocalFileRunTime 
      /cgidev/*.gif
        37    #=========================================================================
        38    # PART 2
        39    #=========================================================================
        40    Options +ExecCGI -SymLinksIfOwnerMatch +Includes -Indexes -MultiViews
        41    AccessFileName .htaccess
        42    AlwaysDirectoryIndex off
        43    DirectoryIndex index.html welcome.html
        44    # The following directives regard the HTTP instance logs
        45    # They are commented out. Uncomment them to have the logs generated
        46    #ErrorLog /cgidev/conf/logs/basic_error_log
        47    #LogFormat "%h %l %u %t \"%r\" %>s %b" common
        48    #CustomLog /cgidev/conf/logs/access_log Common
        49    #LogMaint /cgidev/conf/logs/basic_error_log 60 0
        50    #LogMaint /cgidev/conf/logs/access_log 30 0
        51    #LogLength 512000000
        52    #
        53    BrowserMatch "Mozilla/2" nokeepalive
        54    BrowserMatch "JDK/1\.0" force-response-1.0
        55    BrowserMatch "Java/1\.0" force-response-1.0
        56    BrowserMatch "RealPlayer 4\.0" force-response-1.0
        57    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
        58    #=========================================================================
        59    # PART 3
        60    #=========================================================================
        61    #---- CGIDEV2 directives
        62    Alias /CGIDEV2/ /qsys.lib/cgidev2.lib/
        63    ScriptAlias /CGIDEV2P/ /qsys.lib/cgidev2.lib/
        64    Alias /docs/images /cgidev2/images/
        65    ScriptAliasMatch /cgidev2p/(.*) /qsys.lib/cgidev2.lib/$1
        66    ScriptAliasMatch /cgidev2p/(.*) /qsys.lib/cgidev2.lib/$1
        67    Alias / /qsys.lib/cgidev2.lib/htmlsrc.file/index.mbr
        68    #=========================================================================
        69    # PART 3
        70    #=========================================================================
        71    #---- CGIDEV2 directives
        72    <Directory /QSYS.LIB/CGIDEV2.LIB>
        73         Options None
        74         order allow,deny
        75         allow from all
        76    </Directory>
        77    <Directory /cgidev2/images>
        78        Order Allow,Deny
        79        Allow From all
        80    </Directory> 
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment


      • #4
        Re: I'm not asking for a code Monkey but.....

        change this:
        Code:
          77    <Directory /cgidev2/images>
          78        Order Allow,Deny
          79        Allow From all
          80    </Directory>
        to this:
        Code:
          77    <Directory /cgidev2>
          78        Order Allow,Deny
          79        Allow From all
          80    </Directory>
        and give that a try
        I'm not anti-social, I just don't like people -Tommy Holden

        Comment


        • #5
          Re: I'm not asking for a code Monkey but.....

          Thanks again Tom

          that does make sense, but it had no effect..
          (yes I restarted the web server)

          It might be authority..

          jamie
          All my answers were extracted from the "Big Dummy's Guide to the As400"
          and I take no responsibility for any of them.

          www.code400.com

          Comment


          • #6
            Re: I'm not asking for a code Monkey but.....

            and it could be that neither one of us know what we are doing
            I'm not anti-social, I just don't like people -Tommy Holden

            Comment


            • #7
              Re: I'm not asking for a code Monkey but.....

              just for kicks take the ../ off of the link reference IOW just use style.css it shouldn't matter though. maybe someone who actually knows something will chime in lol

              oh yeah and it looks like you should be using ../images/whatever on your image link.
              Last edited by tomholden; May 25th, 2012, 01:16 PM.
              I'm not anti-social, I just don't like people -Tommy Holden

              Comment


              • #8
                Re: I'm not asking for a code Monkey but.....

                I've tried multiple version of the link....
                I think the configuration is hosed..


                DO you still have CGIDEV2 running on your box?

                If so can you email me your configuration file? ... Please

                thanks
                Jamie
                All my answers were extracted from the "Big Dummy's Guide to the As400"
                and I take no responsibility for any of them.

                www.code400.com

                Comment


                • #9
                  Re: I'm not asking for a code Monkey but.....

                  I can pull a config in a few minutes, but I think your style sheet path is wrong. Where exactly is it located?
                  Michael Catalani
                  IS Director, eCommerce & Web Development
                  Acceptance Insurance Corporation
                  www.AcceptanceInsurance.com
                  www.ProvatoSys.com

                  Comment


                  • #10
                    Re: I'm not asking for a code Monkey but.....

                    thanks.... I just dropped the style sheet on root..

                    but I got it working need to change this
                    Code:
                    Alias /docs/images /cgidev2/images/
                    to
                    Code:
                    Alias /HTTPdocs/ /cgidev2/
                    then need to put full path in RPG...

                    looks like this
                    Click image for larger version

Name:	Noname.jpg
Views:	1
Size:	429.8 KB
ID:	126525

                    Will keep you guys in loop as I crash forward into darkness.
                    All my answers were extracted from the "Big Dummy's Guide to the As400"
                    and I take no responsibility for any of them.

                    www.code400.com

                    Comment


                    • #11
                      Re: I'm not asking for a code Monkey but.....

                      Look at you getting all fancy!
                      Your friends list is empty!

                      Comment

                      sponsored links

                      Collapse

                      Working...
                      X