<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 44,  comments - 48,  trackbacks - 0
     
        
    <entry key="webaddsuccess" value="redirect:/web.do?method=friendSitelist"/>
    posted @ 2007-04-27 09:30 摩西 閱讀(903) | 評論 (2)編輯 收藏
    jsp頁面代碼: 
    <% boolean isClubManager=false;
      Long regionid2 = ((Region)request.getSession().getAttribute("RegionSession")).getId();
      isClubManager=newsPostService.isClubManager(regionid2);
      Region region=(Region)request.getSession().getAttribute("RegionSession");
      String memo=region.getParent().getMemo();
      request.setAttribute("memo",memo);
      %>

    .........

    <gd:label maxLength="150"  text="${memo}"/>
    posted @ 2007-04-24 14:02 摩西 閱讀(1866) | 評論 (0)編輯 收藏

    ClientService.java

    package com.soft.client;

    import org.apache.axis.client.Service;
    import javax.xml.rpc.ServiceException;
    import java.net.MalformedURLException;
    import org.apache.axis.client.Call;
    import org.apache.axis.encoding.ser.BeanDeserializerFactory;
    import javax.xml.namespace.QName;
    import org.apache.axis.encoding.ser.BeanSerializerFactory;
    import java.rmi.RemoteException;

    public class ClientService {
        public ClientService() {
        }
        public UserDTO getUserDTO() {
            String endpoint = "http://localhost:8080/WebModule/services/Myservice";
            QName qset = new QName("urn:Myservice", "UserDTO");
            QName qmethod = new QName("urn:Myservice", "getUserDTO");
            Class clsUserDTO = UserDTO.class;

            UserDTO dto = new UserDTO();
            Service service = new Service();
            try {
                Call call = (Call) service.createCall();
                call.registerTypeMapping(clsUserDTO, qset,
                                         new BeanSerializerFactory(clsUserDTO, qset),
                                         new BeanDeserializerFactory(clsUserDTO,qset));
                call.setTargetEndpointAddress(new java.net.URL(endpoint));
                call.setOperationName(qmethod);
                call.setReturnClass(clsUserDTO);
                dto = (UserDTO) call.invoke(new Object[] {});
               
               
            } catch (ServiceException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (MalformedURLException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (RemoteException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return dto;
        }
        public static void main(String[] args) {
            ClientService cs = new ClientService();
            UserDTO user = cs.getUserDTO();
            System.out.println(user.getPassword());
            System.out.println(user.getUsername());
        }
    }


    UserDTO.java
    package com.soft.client;


    public class UserDTO {

            private String username;
            private String password;

            public String getPassword() {
                    return password;
            }
            public void setPassword(String password) {
                    this.password = password;
            }
            public String getUsername() {
                    return username;
            }
            public void setUsername(String username) {
                    this.username = username;
            }

    }

    posted @ 2007-04-16 16:58 摩西 閱讀(284) | 評論 (0)編輯 收藏
    報錯信息:

    org.apache.jasper.JasperException: <h3>Validation error messages from TagLibraryValidator for c</h3><p>null: com.caucho.xml.XmlParseException: stream:276: expected character in cdata at `?' (\ufffd)</p><h3>Validation error messages from TagLibraryValidator for sql</h3><p>null: com.caucho.xml.XmlParseException: stream:276: expected character in cdata at `?' (\ufffd)</p><h3>Validation error messages from TagLibraryValidator for x</h3><p>null: com.caucho.xml.XmlParseException: stream:276: expected character in cdata at `?' (\ufffd)</p><h3>Validation error messages from TagLibraryValidator for fmt</h3><p>null: com.caucho.xml.XmlParseException: stream:276: expected character in cdata at `?' (\ufffd)</p>
    posted @ 2007-04-16 16:07 摩西 閱讀(1508) | 評論 (1)編輯 收藏
    <script language="javascript">document.write(week[${status.index}])</script>
    posted @ 2007-04-16 14:42 摩西 閱讀(1177) | 評論 (2)編輯 收藏
    .jsp加入代碼:
    <c:set scope="session" value="${page.result}" var="page"></c:set>
    <c:set value="${page1.result}" var="page1" scope="session"></c:set>
    <c:set value="${page2.result}" var="page2" scope="session"></c:set>
    報錯:
    avax.servlet.jsp.el.ELException: The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value cannot be converted to an integer.
    可見這種<c:set>的用法是錯誤的!!!!!!

    posted @ 2007-04-16 13:49 摩西 閱讀(1330) | 評論 (0)編輯 收藏

          import java.util.Map.Entry;
           
         private static Map oldvote=new HashMap();
               ...............................
             ModelAndView mav = new ModelAndView();
            String voteid = ServletRequestUtils.getRequiredStringParameter(request,
                    "voteid");
            String ip = ServletRequestUtils.getStringParameter(request, "ip");

            //遍歷HasMap
            Boolean isoldvote=false;
            Iterator it=oldvote.entrySet().iterator();
            while(it.hasNext()){
                Entry  entry=(Entry) it.next();
                Object key=entry.getKey();
                Object value=entry.getValue();
                if(key.equals(voteid)&&value.equals(ip)){
                 isoldvote=true;
                 break;
                }
            }

            if (isoldvote) {
             ...............................

    posted @ 2007-04-14 09:41 摩西 閱讀(370) | 評論 (0)編輯 收藏
    <a href="javascript:history.go(-1);">[返回]</javascript>
    posted @ 2007-04-14 09:39 摩西 閱讀(1756) | 評論 (1)編輯 收藏

    1.
    <html>
    ?<head>
    ??<title>transPara.htm</title>
    ?</head>
    <body>
    ?<form method="POST" action="acceptPara.jsp">
    ? ??<p align="center">
    ??姓 名:<input type="text" name="name" size="20"><br>
    ? ??年 齡:&nbsp;&nbsp;&nbsp; <input type="text" name="age" size="15"><br>
    ? ??性 別:&nbsp;&nbsp;&nbsp;
    ???<input type="radio" value="male" checked name="sex">
    ????男&nbsp;&nbsp;&nbsp;&nbsp;?
    ? ???<input type="radio" name="sex" value="female">女</p>
    ? ??<p align="center">
    ???<input type="submit" value="submit" name="submit">
    ? ???<input type="reset" value="reset" name="reset"></p>
    ?</form>
    </body>
    </html>

    2.
    <html>

    <%@ page contentType="text/html;charset=gb2312"%>
    <jsp:useBean id="atest"? class="test.AcceptPara"/>

    <head><title>acceptPara.jsp</title></head>

    <body>
    <jsp:setProperty name="atest" property="*"/>?? //? ***將javabean中的屬性自動與html提交過來的變量匹配***********
    Value of property "name" :
    <jsp:getProperty name="atest" property="name"/><br>
    Value of property "age" :
    <jsp:getProperty name="atest" property="age"/><br>
    Value of property "sex" :
    <jsp:getProperty name="atest" property="sex"/><br>
    Value of property "submit" :
    <jsp:getProperty name="atest" property="submit"/><br>

    </body>
    </html>



    3.
    package test;//?? 在一些tomcat舊版本包定義一定要有,且在jsp引用中如下:<jsp:useBean id="atest"? class="test.AcceptPara"/>? 編譯后放在\WEB-INF\classes\test\中

    public class AcceptPara{

    ?String name;
    ?int age;
    ?String sex;
    ?String submit;
    ?
    ?public void setName(String value){
    ??name=value;
    ?}
    ?
    ?public String getName(){
    ??return name;
    ?}
    ?
    ?public void setAge(int value){
    ??age=value;
    ?}
    ?
    ?public int getAge(){
    ??return age;
    ?}
    ?
    ?public void setSex(String value){
    ??sex=value;
    ?}
    ?
    ?public String getSex(){
    ??return sex;
    ?}
    ?
    ?public void setSubmit(String value){
    ??submit=value;
    ?}
    ?
    ?public String getSubmit(){
    ??return submit;
    ?}
    ??
    ?public void acceptPara(){}
    ?
    }

    posted @ 2006-09-08 12:41 摩西 閱讀(766) | 評論 (2)編輯 收藏
    1.Forward_demo.htm:

    <html>
    <head><title>Forward_demo1.htm</title></head>
    <body>
    <form? action="demo1.jsp" method="POST">
    用戶:<input type="text" name="username" size="20"><br>
    密碼:<input type="password" name="password" size="20"><br>
    <input type="radio" name="select" value="manage" checked>管理<br>
    <input type="radio" name="select" value="statictic">資料<br>
    <input type="submit" name="login" value="submit">&nbsp;
    <input type="reset" name="reset" value="重寫">
    </form>
    </body>
    </html>
    2.demo1.jsp:
    <html>
    <head><title>demo1.jsp</title></head>
    <body>
    <%
    String username,password,choice;
    username=request.getParameter("username");
    password=request.getParameter("password");
    choice=request.getParameter("select");
    if (choice.equals("manage")){
    %>
    ??<jsp:forward page="demo1.1.jsp">
    ??<jsp:param name="username" value="<%=username%>"/>
    ??<jsp:param name="password" value="<%=password%>"/>
    ??</jsp:forward>
    <%?}else{
    ???//user select statistic
    %>
    ??<jsp:forward page="demo1.2.jsp">
    ??<jsp:param name="username" value="<%=username%>"/>
    ??<jsp:param name="password" value="<%=password%>"/>
    ??</jsp:forward>
    <%
    ??}
    %>
    </body>
    </html>

    3.demo1.1.jsp:
    <html>
    ?<head>
    ??<title>demo1.1.jsp</title>
    ?</head>
    <body>
    ??This is the Management Page!<br>
    <%
    ??String user,pwd;?
    ??user=request.getParameter("username");
    ??pwd=request.getParameter("password");
    %>
    ??username is: <%=user%><br>
    ??password is: <%=pwd%><br>
    </body>
    </html>
    4.demo1.2.jsp:
    <html>
    ?<head>
    ??<title>demo1.2.jsp</title>
    ?</head>
    <body>
    ??This is the Statistic Page!<br>
    <%
    ??String user,pwd;?
    ??user=request.getParameter("username");
    ??pwd=request.getParameter("password");

    %>
    ??username is: <%=user%><br>
    ??password is: <%=pwd%><br>
    </body>
    </html>
    posted @ 2006-09-07 14:21 摩西 閱讀(4861) | 評論 (2)編輯 收藏
    僅列出標題
    共5頁: 上一頁 1 2 3 4 5 下一頁 
    主站蜘蛛池模板: 91久久亚洲国产成人精品性色 | 亚洲女人影院想要爱| 黄色网址在线免费| 亚洲αv久久久噜噜噜噜噜| 丝瓜app免费下载网址进入ios| 久久久久亚洲av成人无码电影| 一个人晚上在线观看的免费视频| 久久久久亚洲AV成人网| 精品视频一区二区三区免费| 老汉色老汉首页a亚洲| 午夜性色一区二区三区免费不卡视频| 91天堂素人精品系列全集亚洲| 4hu四虎最新免费地址| 亚洲av永久中文无码精品| www国产亚洲精品久久久日本| caoporn国产精品免费| 久久久久久a亚洲欧洲AV| 精品久久8x国产免费观看| 亚洲成a人片在线观看天堂无码| 免费大黄网站在线看| 国产真人无码作爱免费视频| 内射少妇36P亚洲区| 好男人看视频免费2019中文| 九一在线完整视频免费观看| 亚洲AV无码AV男人的天堂| 好爽…又高潮了免费毛片| 好湿好大好紧好爽免费视频| 久久久久亚洲AV无码专区首| 四虎成人免费网址在线| 中文字幕乱码系列免费| 亚洲春色另类小说| 五月婷婷亚洲综合| 91精品国产免费久久国语蜜臀| 亚洲精品乱码久久久久久V| 国产亚洲AV夜间福利香蕉149| 国产精品爱啪在线线免费观看| 精品国产亚洲一区二区三区在线观看| 久久精品国产亚洲夜色AV网站| 日韩免费一级毛片| 日韩免费的视频在线观看香蕉| 国产偷国产偷亚洲高清在线 |