'java coffee'에 해당되는 글 5건

  1. 2020.12.08 Laravel Framework
  2. 2013.08.24 multiple DB Connection on JNDI 1
  3. 2013.08.21 JNDI with Spring
  4. 2009.09.11 SOAP with Axis
  5. 2007.05.28 What is Ajax?

2020. 12. 8. 16:55 java coffee

Laravel Framework

php개발을 급하게 할 일이 생겨서... php framework 중에 라라벨을 선택함.

 

왜? 급하니까!

 

기본적인 인증, 보안등등... 개발하기 편하게 지원하는게 많은 듯... 하지만 뭣도 모르고 사용하는 중이라...

 

특히 Eloquant 장벽과... 프레임웍에서 제공하는 다양한 기능을 잘 활용 못하는 듯한 기분... 아쉽네...

 

개발 속도면에서는 대만족... 

 

 

Release Notes - Laravel - The PHP Framework For Web Artisans

라라벨코리아:: 라라벨 8.x (laravel.kr)

Laravel Tutorial - Tutorialspoint

 

Posted by yongwoo

Last time, I wrote JNDI with Spring Framework.


This time, I add another DB on same Spring Framework with JNDI environment.




#Tomcat setting in Server

 

- server.xml

 

1. Add new resource.


<GlobalNamingResources>

    <!-- Editable user database that can also be used by

         UserDatabaseRealm to authenticate users

    -->

    

  

    <Resource auth="Container" 

     defaultAutoCommit="false" 

     driverClassName="com.mysql.jdbc.Driver" 

     factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" 

     initialSize="10" maxActive="100" maxWait="10000" minIdle="10" 

     name="jdbc/wolfspringDS

     username="spring" 

     password="test" 

     type="javax.sql.DataSource" url="jdbc:mysql://xxx.xxx.xxx.xxx:11000/springbook" 

     validationQuery="SELECT 1 FROM DUAL"/>

    

    

    <Resource auth="Container" 

     defaultAutoCommit="false" 

     driverClassName="com.mysql.jdbc.Driver" 

     factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" 

     initialSize="10" maxActive="100" maxWait="10000" minIdle="10" 

     name="jdbc/afterrainDS" 

     username="afterrain" 

     password="test" 

     type="javax.sql.DataSource" url="jdbc:mysql://xxx.xxx.xxx.xxx:3306/afterrain" 

     validationQuery="SELECT 1 FROM DUAL"/>

               

               

    <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>

  </GlobalNamingResources>



2. Add new Context


<Context docBase="AfterRainJ" path="/openapp" reloadable="true" source="org.eclipse.jst.jee.server:AfterRainJ">

      <ResourceLink global="jdbc/afterrainDS" name="jdbc/afterrainDS" type="javax.sql.DataSource" />

      <ResourceLink global="jdbc/wolfspringDS" name="jdbc/wolfspringDS" type="javax.sql.DataSource" />

</Context>



#root-context.xml


1. add new bean


<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">

        <property name="jndiName" value="java:/comp/env/jdbc/afterrainDS" />

    </bean>

<bean id="dataSourceWolf" class="org.springframework.jndi.JndiObjectFactoryBean">

        <property name="jndiName" value="java:/comp/env/jdbc/wolfspringDS" />

</bean>



#Test JSP


<sql:query var="rs" dataSource="jdbc/afterrainDS">

select code, num, title, contents, gen_usr_id, use_flag  from mboard

</sql:query>


<sql:query var="rswolf" dataSource="jdbc/wolfspringDS">

select code, num, title, contents, gen_usr_id, use_flag  from mboard

</sql:query>



<h2>AWS Query Results</h2>

<c:forEach var="row" items="${rs.rows}">

    Code ${row.code} &nbsp;

    num ${row.num} &nbsp;

    title ${row.title} &nbsp;

    contents ${row.contents} &nbsp;

    Gen_usr_no ${row.gen_usr_id} &nbsp;

    Use_flag ${row.use_flag} &nbsp;  

    <br/> 

</c:forEach>



<h2>WolfSpring Query Results</h2>

<c:forEach var="row" items="${rswolf.rows}">

    Code ${row.code} &nbsp;

    num ${row.num} &nbsp;

    title ${row.title} &nbsp;

    contents ${row.contents} &nbsp;

    Gen_usr_no ${row.gen_usr_id} &nbsp;

    Use_flag ${row.use_flag} &nbsp;  

    <br/> 

</c:forEach>


Posted by yongwoo

2013. 8. 21. 10:16 java coffee

JNDI with Spring

#Environment

  STS, Tomcat 7.0, Mysql

 

 

1. Tomcat setting in Server

 

- server.xml

 

 <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
         
     <Resource auth="Container" 
               defaultAutoCommit="false"
               driverClassName="com.mysql.jdbc.Driver"
               factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
               initialSize="10" maxActive="100" maxWait="10000" minIdle="10" 
               name="jdbc/afterrainDS"
               username="afterrain"
               password="afterrain" 
               type="javax.sql.DataSource" 
               url="jdbc:mysql://127.0.0.1:3306/afterrain" 
               validationQuery="SELECT 1 FROM DUAL"/>
        
     <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
         
  </GlobalNamingResources>

...

...

<Context docBase="AfterRainJ" path="/openapp" reloadable="true" source="org.eclipse.jst.jee.server:AfterRainJ">
       <ResourceLink global="jdbc/afterrainDS" name="jdbc/afterrainDS" type="javax.sql.DataSource" />
</Context>

 

 

2. Spring bean register

 

- root-context.xml

 

<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiName" value="java:/comp/env/jdbc/afterrainDS" />
</bean>

 

 

3. Test JSP

 

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>

<%@ page session="false" %>

<sql:query var="rs" dataSource="jdbc/afterrainDS">
select comp_name, phone, fax, address, gen_usr_no from company
</sql:query>

<html>
<head>
 <title>Home</title>
</head>
<body>
<h1>
 Hello world! 
</h1>

<P>  The time on the server is ${serverTime}. </P>

<h2>Query Results</h2>
<c:forEach var="row" items="${rs.rows}">
    Comp_name ${row.comp_name}<br/>
    Phone ${row.phone}<br/>
    Fax ${row.fax}<br/>
    Address ${row.address}<br/>
    Gen_usr_no ${row.gen_usr_no}<br/>
  
</c:forEach>

</body>
</html>


     

Posted by yongwoo

2009. 9. 11. 01:09 java coffee

SOAP with Axis


공부하자... 공부해서 남줘야지... ㅡ,.-






일단 자고...ㅋㅋ




관련문서파일... 웹서핑중 다운받음...


Posted by yongwoo

2007. 5. 28. 12:37 java coffee

What is Ajax?

Posted by yongwoo
이전버튼 1 이전버튼

블로그 이미지
No man is an island, but sometimes I feel I am an island. Every man is an island. And I stand by that.
yongwoo

공지사항

Yesterday
Today
Total

달력

 « |  » 2024.4
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30

최근에 올라온 글

최근에 달린 댓글

글 보관함