client browser's screen location

2001-12-06 Thread Huaxin

does anybody know how to get client side Browser's screen location?
any idea will be appreciated.




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




from bean to DB

2001-11-30 Thread Huaxin

a little bit off topic

is there any tool support automatically creating SQL statement
and JDBC storing /  loading for Java Bean
like

class Bean{
private String b;
public getter...()
public setter...()
}

and that tool auto creates  SQL:"create table bean ( b varchar2);"

and JDBC calls

private Bean load(){
ResultSet rs = ..
Bean bean = new Bean();
bean.setB(rs.getB());
...
}
private void save(Bean bean){
...
}

Please do NOT tell me to use EJB because that is absolute unnecessary
for my application. I just need a tool to easy my coding, which
is routine and dull.

thanks a lot!


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: JSP/Servlet <-->EJB

2001-11-23 Thread Huaxin

But is this the way a JSP calling EJB?
the examples is just a JB, not EJB

On Fri, 23 Nov 2001, Ludovic Maitre wrote:

> you can instantiate a bean from a JSP page with the jsp:use-bean
> statements as mentionned in the example packaged with tomcat 4 (and 3).
> For more informations read the fine manual or specification of JSP on
> the Sun website (their tutorial are also very good).
>
> in tomcat 4, file webapps/examples/jsp/checkbox/checkresult :
>
> <%! String[] fruits; %>
> 
>
> 
> 
> The checked fruits (got using request) are: 
> <%
> fruits = request.getParameterValues("fruit");
> %>
> 
> <%
> if (fruits != null) {
>   for (int i = 0; i < fruits.length; i++) {
> %>
> ...
>
> regards,
> Ludovic.
>
> Huaxin wrote:
> >
> > A little bit off topic, sorry about that.
> >
> > I see most of the examples using EJB from Servlet.
> > However, is there any example of using JSP with
> > EJB directly? (without too much scriplet, and
> > hopefully more efficient than create a bean to
> > interact with the EJB)
> >
> > thanks a lot
>
> --
>  [EMAIL PROTECTED]
>
>  INRIA - 2004 route des lucioles - BP 93Tel: (33/0) 4 92 38 50 41
>  06902   SOPHIA-ANTIPOLIS cedex (France)Fax: (33/0) 4 92 38 76 02
>
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




filter applied on JSP?

2001-11-12 Thread Huaxin

is it possible to have a filter working on a JSP file?

I tryed the following, with TEMPLATE = "index.jsp", "index.jsp"
but all doesn't work.

  

servletLogFilter
 TEMPLATE




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




"forward" to servlet not go through Filter

2001-11-11 Thread Huaxin

Can you paste your code for more details?

-Original Message-
From: Lester June Cabrera [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 11, 2001 8:28 PM
To: [EMAIL PROTECTED]
Subject: OutputStream Error



Hi,

How do I prevent the following error from occurring? Basically, it happens 
when I have a JSP page that has links to another JSP file, say 
"view.jsp?file=1". So the only thing that changes is the file parameter 
that's being passed. If I click link1, it's OK. But if I click  the other 
links, the following error shows up.

Internal Servlet Error:
java.lang.IllegalStateException: OutputStream is already being used for 
this request


Thanks,
Lester


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 

--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




where to find the class's names

2001-10-02 Thread Huaxin

I see this usage of attribute as below:

  <%
String requestURI = (String)
 request.getAttribute("javax.servlet.error.request_uri");
  %>

Could anybody tell me where is that javax.servlet.error.request_uri
defined?






security manager

2001-09-22 Thread Huaxin

How can I specify the runtime permission to disable exitVM
in policy file?
I looked at the default tomcat.policy file, and there is
no hint on how can I do that for RuntimePermission.






login question

2001-09-22 Thread Huaxin

In the example of "webapp/admin", the Tomcat Administration
Tools asked me for username and password everytime. What
value should i type in? I looked at the source code and find
no where this thing is specified. I think it is a "Realm"
thing, but still don't know where to start from. Would any
one point the file that contain the username/password for me?

thanx a lot





Re: JSP page to Oracle with Tomcat all files

2001-09-18 Thread Huaxin

Just curious on the URL you've mentioned, how can you
append the userid and passwd after the jdbc:oracle:thin:@xxx.x things?

i know the format for cloud DB, i am wondering it for oracle only

On Tue, 18 Sep 2001, P.Miller wrote:

> Hi Peter,
>
> I put the IP-Adress after the '@' and use the 'thin' driver instead of
> the 'oci8'.
> Also you have to put the port# on which the Listener waits for calls.
> In most cases it's the 1521.
> And the name of your Database ORCL or something else
> So the string should look like :
> jdbc:oracle:thin:@xxx.xxx.xxx.xxx:1521:ORCL
> plus userid and password.
>
> Hth
>
> Peter
> >
> > Not sure why all the attachments did not come through but here goes
> > again:
> >
> > Tomcat 4.0 b7
> > Solaris 8
> > Oracle 8.1.7
> >
> > I am trying to perform a Oracle DB query from a jsp page. I have included
> > the web.xml file the jsp page "fwtst.jsp" and the error message I am
> > having returned to me from the query.
> > I believe the problem is that I do not know how to make system
> > environments known to JSP or Tomcat. This is because of the error I am
> > getting which is "javax.servlet.ServletException: ORA-12154: TNS:could
> > not resolve service name  at so on and so on"
> >
> > >From my Oracle experience I know this error typically mean you are using
> > the wrong  DB alias or  an environment variable such as ORACLE_HOME or
> > TNS_ADMIN is not set or is incorrect.
> >
> > Before I start Tomcat I have checked and re-checked my ability to run
> > sqlplus and connect to the DB but from the JSP page I cannot.
> >
> > My questions are
> > Can I set environmental variables such as ORACLE_HOME in the JSP.  If so
> > how? please give a short example
> > Can I use one of  Tomcat's files such as web.xml or server. xml ??
> > Can I use one of the web-appliation files such as web.xml??
> >
> > Thanks
> > Pete
> >
> >   
> >Name: files.tar
> >files.tar   Type: Unix Tape Archive (application/x-tar)
> >Encoding: base64
> > Description: filename="files.tar"
>




how to test the website scalability

2001-09-17 Thread Huaxin

This is quite general to all website development.

When the website is completed, how can I test its
scalability by faking a lot of URL request for it
from various IPs concurrently? is there kind of such
tools for that?

thanks a lot!






Re: AW: custom tag

2001-09-13 Thread Huaxin

I have an sort of irrelant question: when several .jar
file specifies the same class, how should we determine which
.jar file is responsible for the class currently?

Just as we see, too much time has been spent on similar situation
like this one below.

Thanks a lot!
Huaxin

On Thu, 13 Sep 2001, Stadie wrote:

>   Sorry, you're right. Wasn't the servlet.jar, was the j2ee.jar !!
>   Thanx a lot.
>
> > Looks like you have an old copy of "servlet.jar" in your Java extensions
> > directory ($JAVA_HOME/jre/lib/ext).  Don't do that.
> >
> > Craig
> >
> >
> > On Thu, 13 Sep 2001, Stadie wrote:
> >
> > > Date: Thu, 13 Sep 2001 19:39:06 +0200
> > > From: Stadie <[EMAIL PROTECTED]>
> > > Reply-To: [EMAIL PROTECTED]
> > > To: [EMAIL PROTECTED]
> > > Subject: custom tag
> > >
> > > Hi,
> > > not easy to run custom tags with tomcat.
> > > I'm using jakarta-tomcat-4.0-rc1. By trying the example:
> > > http://localhost:8080/examples/jsp/simpletag/foo.jsp
> > > an error occurs.
> > > --- ERROR:
> > > A Servlet Exception Has Occurred
> > > org.apache.jasper.JasperException: Unable to compile class for JSP
> > >
> > > An error occurred at line: 15 in the jsp file: /jsp/simpletag/foo.jsp
> > >
> > > Generated servlet error:
> > > C:\tom40\work\localhost\examples\jsp\simpletag\foo$jsp.java:98: No
> > variable
> > > EVAL_BODY_AGAIN defined in interface javax.servlet.jsp.tagext.BodyTag.
> > >   } while (_jspx_th_eg_foo_0.doAfterBody() ==
> > > javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
> > >
> > > --- END Error
> > >
> > > What is the problem, I'm trying around for several days just to run only
> > one
> > > custom tag. But nothing works.
> > >
> > > Thanx Peter
> > >
>




Re: JSP/Servlet <-->EJB

2001-09-11 Thread Huaxin

Thanks Craig and Bojan

I always kept the module 2 in mind, as well as efficiency. Using
JSP for presentation, forward request to Servlet, then forward to
EJB, and the same procedure back involves lots of overhead.

Using JSP for presentation, invoke a JSP bean, and from that
bean to EJB...  I think this is also module 2, but may be faster.

Using JSP for presentation, doing something else to EJB.. ? I am
eager to see this example. If it is not available, I would like to
see some examples of the JSP-->JPS Bean-->EJB solution.

Thanks again


On Wed, 12 Sep 2001, Bojan Smojver wrote:

> Huaxin wrote:
> >
> > A little bit off topic, sorry about that.
> >
> > I see most of the examples using EJB from Servlet.
> > However, is there any example of using JSP with
> > EJB directly? (without too much scriplet, and
> > hopefully more efficient than create a bean to
> > interact with the EJB)
> >
> > thanks a lot
>
> Every JSP eventually becomes a servlet, so there shouldn't be any
> technical difficulties in doing that.
>
> But, is this really the design you want to have? Embedding EJB call
> machinery into JSP will make the code contain a lot of the stuff that
> has nothing to do with presentation. Unless, of course, you're using the
> JSP's for non presentational purposes here... But if you do, then
> straight servlets or beans are a better choices anyway, therefore the
> lack of examples :-)
>
> Here is an article that explains the Model 2 architecture:
> http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html
>
> Bojan
>




JSP/Servlet <-->EJB

2001-09-11 Thread Huaxin

A little bit off topic, sorry about that.

I see most of the examples using EJB from Servlet.
However, is there any example of using JSP with
EJB directly? (without too much scriplet, and
hopefully more efficient than create a bean to
interact with the EJB)

thanks a lot





RE: Problems with tomcat integrated to Apache

2001-09-10 Thread Huaxin

The "LoadModule apachemodulejserv.dll" is automatically
generated by Tomcat 3.2.0 into the tomcat-apache.conf file.

I can't just delete the "LoadModule ..." stuff coz there
are tons of reference to API in that module in the
"tomcat-apache.conf" file.

Anybody with similar experience for integrating Tomcat 3.2
to Apache on Windows 2000?


On Mon, 10 Sep 2001, Tony Vinayak wrote:

> Obvious question: do you have addmodule/loadmodule lines corresponding to
> the apachemodulejserv.dll in your conf file? You don't need it if running
> Tomcat.
>
> cheers,
> Tony
>
> -Original Message-
> From: Huaxin [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 10, 2002 2:37 PM
> To: [EMAIL PROTECTED]
> Subject: Problems with tomcat integrated to Apache
>
>
>
> When I add the tomcat-apache.conf to apache's http.conf
> to incorporate Tomcat to Apache webserver,
> I get the following message when i tried to start Apache
>
> cannot load modules/apachemodulejserv.dll into server...
>
>
> I thought it is trying to load jserv rather than Tomcat...
> Is there any solution to this?
>
> Thanks a lot!
> Huaxin
>
>
>
>
>




why tomcat

2001-09-10 Thread Huaxin

Maybe I am confusing, but I don't know if I still need
TOm-cat or even J2EE if I have BEA-Weblogic.

It seems to me BEA-Weblogic can do the job at least for
Tomcat

Thanks a lot!





Problems with tomcat integrated to Apache

2001-09-10 Thread Huaxin


When I add the tomcat-apache.conf to apache's http.conf
to incorporate Tomcat to Apache webserver,
I get the following message when i tried to start Apache

cannot load modules/apachemodulejserv.dll into server...


I thought it is trying to load jserv rather than Tomcat...
Is there any solution to this?

Thanks a lot!
Huaxin