A very simple question
I have a very simple question. I have a web application ready to be deployed on a TomCat server. I want to generate a single "war" file for deployment but want to save myself the effort of editing "web.xml" file manually. Q- Are there any tools (for free) which can generate a "war" file (for Tomcat) for you? Cheers, __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: A very simple question
use java "jar" command jar cvf myweb.war * the command above will create a war file which contains all the file on your current working directory. regards, wayan -Original Message- From: Compulsive Obsessive [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 02, 2001 5:48 PM To: [EMAIL PROTECTED] Subject: A very simple question I have a very simple question. I have a web application ready to be deployed on a TomCat server. I want to generate a single "war" file for deployment but want to save myself the effort of editing "web.xml" file manually. Q- Are there any tools (for free) which can generate a "war" file (for Tomcat) for you? Cheers, __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Session lost in IIS / Tomcat configuration.
Hi all, I would like to post a question to the community that I am hoping some of you may have encountered and know the solution to. Based on the project requirements, we have to use IIS as our Web Server and Tomcat to run as a servlet container. The problem I am facing is that the session can't seem to be maintained, after moving from our login page to the second page. At the moment, I used the url mapping feature to map all commands that end with a (*.do) extension to the central Controller servlet. Based on the command, e.g. (Login.do) for login page, the servlet will load the corresponding jsp page, called A.jsp, which is actually a frame, that loads other pages, B.jsp and C.jsp respectively. However, I have tested out and found that the value of sessionId in the A.jsp file is always different than the sessionId on B.jsp, indicating that request sent to the server are somehow not being interpreted/and redirected to the servlet container properly; and I also ensured that all cookies were allowed by the browser while doing this test. To fully ensure that sessionId returned by the Tomcat container is similar to the one sent back via request, I decided to use url encoding,(via the response.encodeURL() method) but found that IIS could not map the encoded url with the values I had set in the uriworkermap.properties file. The encoded url looked like below: Below is a listing of the mappings for IIS-Tomcat defined in the 'uriworkermap.properties' file. --- /MyProject/servlet/*=$(default.worker) /MyProject/*.jsp=$(default.worker) /MyProject/*.do=$(default.worker) /MyProject/*=$(default.worker) Hence, I was wondering if any of you knew anything that I may have overlooked that could help solve this session problem I am facing. The funny thing though, is that I created another 3 jsp pages, all linked to one another(just to test if the issue was really a bad mapping), that did not use any commands (*.do) extensions. That means, all I just did was pass a parameter from A.jsp, which had link to B.jsp (in there I saved the request parameter to the session and displayed it on page), and which had a link to C.jsp, where I displayed the same value in the session again, and it worked perfectlyindicating that a single session was used and maintained throughout the navigation process. But, then this just drove me nuts because if the .jsp extension can work how come not a *.do one? Am I making any sense? Anyway, I would really appreciate it if any of you may have any ideas or comments about my problem... Thanks in advance. Cheers' Henry The current setup of the system is: -- Web Browser: IE 5.5 Sp1 Web server: IIS 5.0 Servlet Container: Tomcat 3.2.3 -Original Message- From: Niraj Soni [mailto:[EMAIL PROTECTED]] Sent: Friday, March 30, 2001 2:09 PM To: [EMAIL PROTECTED] Subject: Re: Where are you JSP/SERVLET GURUS ??? this is because of ur using tomcat as a add-on-servlet engine with other main web serve if u r using iis put your images in iis root or in uriworkers.properties file of your tomcat in /conf directory append follwing line /images/* this tells the isapi filter to serve all files request starting with /images from tomcat hope this hepls - Original Message - From: "sufi malak" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 30, 2001 1:45 AM Subject: Where are you JSP/SERVLET GURUS ??? > Hi, I posted the same question twice, and I am sure that the same problem > happened to somone before, > Why when a servlet forwarding a jsp does not see a directory (under the root > application) that has images, the structure is like this : > tomcat4/webapps/myapp/images/ > tomcat4/webapps/myapp/tableview.jsp > tomcat4/webapps/myapp/WEB-INF/classes/Myservlet.class > > Please help me > Sufi > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.c
Re: Servlet & Mysql
Thanks. now works fine! Cheers, Papo - Original Message - From: "I Wayan Saryada" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 02, 2001 1:49 AM Subject: Re: Servlet & Mysql > Hi, > > To make sure that your database connection is closed > add the finally block, so it would be like this: > > try { > // your code here > // > > // you close your db connection here > rs.close(); > stmt.close(); > conn.close(); > } catch (Exception e) { > > } finally { > // make sure it's closed > if (rs != null) rs.close(); > if (stmt != null) stmt.close(); > if (conn != null) conn.close(); > } > > regards, > Wayan > > -Original Message- > From: Papo Napolitano [mailto:[EMAIL PROTECTED]] > Sent: Sunday, December 02, 2001 5:55 AM > To: [EMAIL PROTECTED] > Subject: Servlet & Mysql > > > Hi! > > I've written the following Servlet to read an Image from a Mysql Database > and send it to the browser. > > public class ImageServlet extends HttpServlet { > public void doGet(HttpServletRequest request,HttpServletResponse response) > throws ServletException, IOException { > try { > InitialContext jndiContext = new InitialContext(); > DataSource ds = (DataSource)jndiContext.lookup("java:/mySQLDS") ; > Connection conn = ds.getConnection() ; > Statement stmt = conn.createStatement(); > ResultSet rs = stmt.executeQuery("SELECT image from docs where idx=" + > request.getParameter("idx")); > >if (rs.next()) { > response.setContentType("image/gif"); > PrintWriter out = response.getWriter(); > out.println(rs.getString("file" + request.getParameter("idximg"))); > response.flushBuffer(); >} > >rs.close(); >stmt.close(); >conn.close(); >ds = null ; > > } catch(Exception e){ > response.setContentType("text/html"); > PrintWriter out = response.getWriter(); > out.println("Error: "+e); > } > } > } > > > It works fine, but I've seen that it leaves mysql instances opened in my > server... Any idea ??? > > Cheers, > > Papo > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
doubt regarding include files
Hi all, i have a jsp which inlcudes label.jsp. But problem is that this label jsp has so many labels both in english and korean charcters. the client wants to see the korean characters on the screen. But whne i debugged the code there are so many string variables being instantiated as many as 300+. i know this is a very big resource consuming. can anybody let me know whats the best practice(like reosurce bundles)? = For Stock Quotes, Finance News, Insurance, Tax Planners, Mutual Funds... Visit http://in.finance.yahoo.com/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: doubt regarding include files
Hello Ramesh! Monday, December 03, 2001, 3:02:01 AM, you wrote: RK> i have a jsp which inlcudes label.jsp. But problem is RK> that this label jsp has so many labels both in english RK> and korean charcters. the client wants to see the RK> korean characters on the screen. RK> But whne i debugged the code there are so many string RK> variables being instantiated as many as 300+. RK> i know this is a very big resource consuming. All these strings are compiled into the source of the servlet that is being generated from your .jsp page. All that you should be worried about is that you do not a too long method jspService() (or whatever it is). I do not thing you will. Have you already hit the problem? If not, try to double you page and see again. Again, you get larger .java class, large .class, but is it really resource consuming? I do not think so! RK> can anybody let me know whats the best practice(like RK> reosurce bundles)? I beleive resource bundles would really be resource consuming! And if you use for example i18n taglib from jakarta-taglibs then the code generated will get _longer_! So what i would advice is stay with static strings, that is a fine approach! === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
OT: Apache & Tomcat
Hi all, I would like help on a couple of things. I have Apache and Tomcat running on my system. 1) I want to configure the httpd.conf file of Apache such that my Servername is somethings like 'ifpintranet.org' instead of the computer name or its ip address. I want to do this on my intranet. I have not registered 'ifpintranet.org' anywhere. Is this possible? 2) I would like to configure Tomcat and Apache to run together and my Tomcat related applications to run on 'ifpintranet.org' instead of 'computername:8080' How could I do this? Thanks a lot in advance Jyotinarayanan
How to pass some parameters to other excutable program and get th e return value back?
Title: How to pass some parameters to other excutable program and get the return value back? How to pass some parameters to other excutable program written in other languages and to get the return value back?
i18n/servlets/jsp: tutorial/essay
Hello, community! :-) I have spent quite a bit time solving two complementary problems: outputting web pages in national (cyrillic, Japanese, Chinese)characters/ reading form parameters with national characters with servlets/jsps. I have also spent quite a bit time answering questions about these tasks in several mailists - looks like this sometimes becomes a quest for people. So I have written a short tutorial/essay on this topic that I would like now to present for your attention and review. http://tagunov.newmail.ru/i18n/i18n.html I would really this to be the link I will easily send people when I hear them ask again questions that I have already answered a number of times various maillists, so I modestly ask those of you who are interested in the subject and/or have any experience in this field to comment on it and correct my surely numerous and large mistakes :-) BTW, i have developed one arguable idea in this essay that i would very much like to discuss with experts. It is about the fact that you can't dynamically choose a charset in a jsp in a servlet-engine portable way.. This idea closely touches the question of how functional any imagenable i18n taglib can be.. There are a couple places in this essay that i would eagerly like to make more complete. To do this i need feedback, especially from people who run servlet engines different from mine... Having thought through my ideas well i would certainly like now to share them with the community and possibly start some discussion around it! :-) And without any doubt, I invite everybody who is experiencing problems with i18n/servlets/jsps to try to find some help in this modest study. -- Sincerely yours, Anton Tagunov http://tagunov.newmail.ru mailto:[EMAIL PROTECTED] === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Servlet & Mysql
Hi Can you please tell me which application server you are using to connect to the mysql databse. And which mysql driver you are using to connect to the mysql database. REgards Deepak --- Papo Napolitano <[EMAIL PROTECTED]> wrote: > Thanks. now works fine! > > Cheers, > Papo > - Original Message - > From: "I Wayan Saryada" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, December 02, 2001 1:49 AM > Subject: Re: Servlet & Mysql > > > > Hi, > > > > To make sure that your database connection is > closed > > add the finally block, so it would be like this: > > > > try { > > // your code here > > // > > > > // you close your db connection here > > rs.close(); > > stmt.close(); > > conn.close(); > > } catch (Exception e) { > > > > } finally { > > // make sure it's closed > > if (rs != null) rs.close(); > > if (stmt != null) stmt.close(); > > if (conn != null) conn.close(); > > } > > > > regards, > > Wayan > > > > -Original Message- > > From: Papo Napolitano [mailto:[EMAIL PROTECTED]] > > Sent: Sunday, December 02, 2001 5:55 AM > > To: [EMAIL PROTECTED] > > Subject: Servlet & Mysql > > > > > > Hi! > > > > I've written the following Servlet to read an > Image from a Mysql Database > > and send it to the browser. > > > > public class ImageServlet extends HttpServlet { > > public void doGet(HttpServletRequest > request,HttpServletResponse > response) > > throws ServletException, IOException { > > try { > > InitialContext jndiContext = new > InitialContext(); > > DataSource ds = > (DataSource)jndiContext.lookup("java:/mySQLDS") ; > > Connection conn = ds.getConnection() ; > > Statement stmt = conn.createStatement(); > > ResultSet rs = stmt.executeQuery("SELECT image > from docs where idx=" + > > request.getParameter("idx")); > > > >if (rs.next()) { > > response.setContentType("image/gif"); > > PrintWriter out = response.getWriter(); > > out.println(rs.getString("file" + > request.getParameter("idximg"))); > > response.flushBuffer(); > >} > > > >rs.close(); > >stmt.close(); > >conn.close(); > >ds = null ; > > > > } catch(Exception e){ > > response.setContentType("text/html"); > > PrintWriter out = response.getWriter(); > > out.println("Error: "+e); > > } > > } > > } > > > > > > It works fine, but I've seen that it leaves mysql > instances opened in my > > server... Any idea ??? > > > > Cheers, > > > > Papo > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with > body: "signoff > > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with > body: "set JSP-INTEREST > > DIGEST". > > Some relevant FAQs on JSP/Servlets can be found > at: > > > > http://archives.java.sun.com/jsp-interest.html > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > http://www.jguru.com/faq/index.jsp > > http://www.jspinsider.com > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with > body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with > body: "set JSP-INTEREST > DIGEST". > > Some relevant FAQs on JSP/Servlets can be found > at: > > > > http://archives.java.sun.com/jsp-interest.html > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > http://www.jguru.com/faq/index.jsp > > http://www.jspinsider.com > > > > === > To unsubscribe: mailto [EMAIL PROTECTED] with > body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: > "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Servlet & Mysql
You should always close Connection, Statements and Resultsets in a finally { } El 2001.12.01 22:55 Papo Napolitano ha escrit: > Hi! > > I've written the following Servlet to read an Image from a Mysql Database > and send it to the browser. > > public class ImageServlet extends HttpServlet { > public void doGet(HttpServletRequest request,HttpServletResponse > response) > throws ServletException, IOException { > try { > InitialContext jndiContext = new InitialContext(); > DataSource ds = (DataSource)jndiContext.lookup("java:/mySQLDS") ; > Connection conn = ds.getConnection() ; > Statement stmt = conn.createStatement(); > ResultSet rs = stmt.executeQuery("SELECT image from docs where idx=" > + > request.getParameter("idx")); > >if (rs.next()) { > response.setContentType("image/gif"); > PrintWriter out = response.getWriter(); > out.println(rs.getString("file" + request.getParameter("idximg"))); > response.flushBuffer(); >} > >rs.close(); >stmt.close(); >conn.close(); >ds = null ; > > } catch(Exception e){ > response.setContentType("text/html"); > PrintWriter out = response.getWriter(); > out.println("Error: "+e); > } > } > } > > > It works fine, but I've seen that it leaves mysql instances opened in my > server... Any idea ??? > > Cheers, > > Papo > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > -- Antoni Reus === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Getting started
http://java.sun.com/products/jsp/pdf/jsptut.pdf -Original Message- From: Guilherme Chapiewski [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 02, 2001 12:39 AM To: [EMAIL PROTECTED] Subject: Getting started Hi Javas! I have kinda experience in developing web software but none in JSP. I'd like your help, where can I find information and stuff to start learning JSP? Hope soon I can help you too! Regards, Guilherme === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com ==To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com