Contact Us
  
 
 
    SearchSearch   RegisterRegister   Log inLog in 

solution for myjavaserver.com question

solution for myjavaserver.com question

 
Post new topic   Reply to topic     Forum Index -> Java,Struts framework, Velocity, JSF, Hibernate, Servlet, JSP, javaBeans
View previous topic :: View next topic  
Author Message
solutionGood



Joined: 05 Mar 2007
Posts: 1

PostPosted: Mon Mar 05, 2007 12:21 pm    Post subject: solution for myjavaserver.com question Reply with quote

Code:
public String getHandler(String[] config, String requestUri) {
       
       String requestMapping = requestUri.substring(0, requestUri.lastIndexOf("/"));
       
       int k = 0;
       
       if(requestMapping.length() == 0) requestMapping = "/";
 
       for(int i = 0; i < config.length; i+=2) {
          if (config[i].equals(requestMapping) || config[i].equals("/")) {
                k = i + 1;
          }
       }
       
       return (k ==0 ? "N6PCAq":config[k]) ;
    }
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Java,Struts framework, Velocity, JSF, Hibernate, Servlet, JSP, javaBeans All times are GMT
Page 1 of 1

 
Jump to:  
  Quick Post a Reply Topic
     
  Name (required)  
     
  Email Address (will not be published) (required)  
     
  Subject of topic (required)  
     
   
     
   
     
  Advertisement  
     
 
     


  More Links  
 
JSP Introduction
JSP Setup
Simple JSP Example
JSP Variable
Array Declaration in JSP
JSP Forms and User Input
Form Validation
JSP Cookies
JSP Session Object
Loop, content collection, iterator, conditional check in JSP
JSP Application Object
JSP Include
JSP Response Object
JSP Request Object
JSP Error Handling
JSP File Handling Object
JSP Action Tag
JSP Implicit Objects
JSP Declaration
JSP Directive
JDBC Introduction
JDBC Driver
JDBC Connection
JDBC Prepared/Statement
JDBC ResultSet
JDBC Close Connection object
JDBC Insert
JDBC Display Records
JDBC Update
JDBC Delete
JDBC Sorting
JDBC Query
JDBC Exception
JDBC Add Batch
JDBC Transaction/RollBack