Yu Tao

Greenhorn
+ Follow
since Dec 12, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Yu Tao

do you know that JSP how to connection servlet???

if your know

i will tell you serlvet how connection database
[ June 29, 2005: Message edited by: Yu Tao ]
14 years ago
Could you have Mastering EJB....

In this Book tell your how call session Bean in Servlet
14 years ago
To make sure:
1 you have form bean, action servlet and JSP?!
2 make sure your have all of struts dev JAR?!
3 could you copy the struts dev JAR to your TOMCAT %globalHome% or in your %Project Home%

if every thing is OK>>>change your action as follow:
In your struts-config.xml,

action mapping path=xxx.do(un-change)

change:

action mapping path=xxx

if Error also
pls Post your exception
OK?

[ June 03, 2005: Message edited by: Yu Tao ]
[ June 03, 2005: Message edited by: Yu Tao ]
14 years ago
Hi I'm not sure if this is the correct place to post this, but I've seen the same problem posted elsewhere on the web and seen it left unresolved.

This is the error I get when I try just to instansiate ( DiskFileUpload d = new DiskFileUpload() ),

I've tried almost everything with it, please help!! ( ps: I'm using eclipse and jboss4, I'm pretty sure my classpaths are ok - I put the commons jar into the shared lib folder of jboss )

any help would be really appreciated.

java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
fileupload.FileUpload.doPost(FileUpload.java:36)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
14 years ago
Note that the JDBC libraries are required by a definition of a resource
in server.xml (not by your application ). Try putting them drivers in
$TOMCAT_BASE/common/lib, to make them available to that resource.
15 years ago
JSP
In my action
String myaction = mapping.getprarmeter();
if("List".equalsIgnoreCase(myaction)){
myforward = performList(mapping, form, request, response);
}
when I System.out.println("myaction:"+action)
report
myaction : null

In My JSP:
<html:submit><bean:message key="List.index"/></html:submit>
List.index=List
how to modifiy my progarm.

thans a lot
15 years ago
goto microsoft and download JDBC Driver

after setup the Dirver you can see three JAR.

copy this three JAR to JAVA_HOME/jre/lib/ext

just OK!
Mabe you try like this

create procedure test1
...........
create procedure test2
...........
create procedure control
@varchar(10) str;
begin
if(str='right code'){
call test1;
}else{
call test2;
}
END
go

do you understand???
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>


http://jakarta.apache.org/taglibs/index.html

finding you need JAR and put these JAR on you /WEB-INF/lib

Maybe is OK!
15 years ago
JSP
Hello

I am study struts.
but I find torque pakeage??

what is torque pakeage??

How to use??

thanks
15 years ago
Class.forName("ids.sql.IDSDriver").newInstance();
this is error

what is you database??? SQL???Oracle???MysQL???
Hi ervery one



My IDE eclipse2.1.3 lomboz 2.1.3
My Server jboss-3.2.6

in jboss.xml

<session>
<ejb-name>StoreAccess</ejb-name>
<jndi-name>StoreAccessBean</jndi-name>
<local-jndi-name>StoreAccessLocal</local-jndi-name>
<ejb-local-ref>
<ejb-ref-name>ejb/CustomerLocal</ejb-ref-name>
<jndi-name>CustomerLocal</jndi-name>
</ejb-local-ref>
<resource-ref>
<res-ref-name>jdbc/Test</res-ref-name>
<jndi-name>java:/Test</jndi-name>
</resource-ref>

<method-attributes>
</method-attributes>
</session>
when deploy my ejb,eclipse report "Element type "ejb-local-ref" must be declared"

how to declare ejb-local-ref

thanks
15 years ago

Originally posted by Avi Abrami:
Yu,

  • Because SQL Server is not running?
  • Because you are using the wrong port?
  • Because SQL Server is not listening for database connections?


  • Have you tried the Microsoft Web site?

    Good Luck,
    Avi.



    1 My SQL Server is runing
    2 SQL Server port is 1433 this is SQL Server dafault port
    3 I can use ODBC to connetion SQL Server except JDBC.

    why???
    package sqlServer;

    import java.sql.Connection;
    import java.sql.DriverManager;

    public class SQLServerTest {
    public static void main(String[] args) {
    try {
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=Northwind", "sa", "");
    System.out.println("TEST");
    } catch(Exception e) {
    System.out.println(e);
    }
    }
    }

    Excepton
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

    why ???