Re: Better way to build a site than or with JSPs ?
Thank you for replying Trefor. Yes, you understand correctly. And I have considered your solution (using one servlet or JSP) but have a couple of problems with it ~ 1. It produces some really horrible URLS. For example ~ http://www.yyy.com/index.jsp?level1=Products&level2=Goo&level3=... This isn't just my girly esthetics but it's actually a problem when our sales reps want to tell somebody the URL of a particular product over the phone. So easy to ay "www dot yyy dot com slash products slash bathroom" compared to saying the querystring equivalent. 2. For a site with say 300 pages, that 'switch' statement (or whatever is used to fetch the body content) gets very long, complex and prone to error. For this reason, if I were to use the method that you suggest, I would stick all the content in a database and then use a Javabean to extract it, but that brings up the problem that I don't have a content management system to manage the content in the database :( It's strange to think that we don't have a silver bullet for this yet. Soefara. >From: "Gare, Trefor" <[EMAIL PROTECTED]> >Reply-To: A mailing list about Java Server Pages specification and >reference <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: Re: Better way to build a site than or with JSPs ? >Date: Wed, 27 Feb 2002 18:35:51 +1100 > >I may not have quite understood your structure but it seems strange to be >creating all those separate directories when it's only the body include >that >is changing for each link. It looks like you should be using a servlet to >detect which link has been requested (via the querystring perhaps) and then >creating each page dynamiclly. The same could be done in a JSP if you >prefer with a switch statement or a set of if/else statements leading to >the >different includes > > >ie: > index.jsp > - > <%@ include file="/Global/Banner.jsp" %> > > > <%@ include file="/Global/Menu.jsp" %> > > <% > if (request.getParameter("linkName") == "blah"){ > //include the blah body text > }else if (request.getParameter("linkName") == "blob"){ > //include the blob body texyt > }else{ > //include the default body text > } > %> > > > > <%@ include file="/Global/Footer.jsp" %> > >That would mean that essentially all you'd be editing would ever be the >body includes. _ Send and receive Hotmail on your mobile device: http://mobile.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://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: Sorry but it's urgent: How to get window width at IE 5?
Ok, a combination of this two to fix the window size and fixing also the frames size seems to be the solution. Thanks guys. Julia -Mensaje original- De: Philip Steel [mailto:[EMAIL PROTECTED]] Enviado el: martes, 26 de febrero de 2002 19:19 Para: [EMAIL PROTECTED] Asunto: Re: Sorry but it's urgent: How to get window width at IE 5? this should do it document.write(screen.availWidth); -Original Message- From: Bommakanti, Vamsee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 6:06 PM To: [EMAIL PROTECTED] Subject: Re: Sorry but it's urgent: How to get window width at IE 5? Try window.resizeTo(x,y) in IE You can set the length(y) and width(x) Hope this helps Thanks Vamsee -Original Message- From: "Villén Pizarro, Julia" [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 11:23 AM To: [EMAIL PROTECTED] Subject: Sorry but it's urgent: How to get window width at IE 5? Hi all: ¿Anyone knows how to get the navigator window width at IE 5 (using JavaScript)? I tried "document.body.width" but it doesn't work since I need window width to define the size of frames, and a page made out of frames doesn't have body or it has it underneath the frames so this sentence won't work. At NS works perfectly width "window.innerWidth", but not at IE. Know any method like this at IE? Sorry for using this forum but I didn't get an answer in the specific ones and I'm a bit desperated. Other question by the way: a link to your favorite JSP advanced tutorial? Thanks in advance, Julia ==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 ==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: Better way to build a site than or with JSPs ?
I may not have quite understood your structure but it seems strange to be creating all those separate directories when it's only the body include that is changing for each link. It looks like you should be using a servlet to detect which link has been requested (via the querystring perhaps) and then creating each page dynamiclly. The same could be done in a JSP if you prefer with a switch statement or a set of if/else statements leading to the different includes ie: index.jsp - <%@ include file="/Global/Banner.jsp" %> <%@ include file="/Global/Menu.jsp" %> <% if (request.getParameter("linkName") == "blah"){ //include the blah body text }else if (request.getParameter("linkName") == "blob"){ //include the blob body texyt }else{ //include the default body text } %> <%@ include file="/Global/Footer.jsp" %> That would mean that essentially all you'd be editing would ever be the body includes. Tref Gare Web Developer MCSD/SCJP eCommerce Group Phone: (03) 9221 4106 Mobile: 0409 556 478 Fax:(03) 9941 4295 > -Original Message- > From: Soefara Redzuan [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday,27 February 2002 5:39 > To: [EMAIL PROTECTED] > Subject: Better way to build a site than or with JSPs ? > > I've experimented and have found one way to templated site with JSP but > there has to be a better way. First, I'll explain what I do at the moment. > Consider a very simplistical sitemap ~ > > Homepage > +-Company > +-Products > +-Services > +-Feedback > > I've created a folder structure to represent this. And the default page in > each folder is index.jsp. Each page (index.jsp) shares the same banner > (Banner.jsp), footer (Footer.jsp) and navigation menu (Menu.jsp) which go > in > the Global folder. So, this gives me the following ~ > > index.jsp (Homepage) > \Company\index.jsp > \Products\index.jsp > \Services\index.jsp > \Feedback\index.jsp > \Global\Banner.jsp >\Menu.jsp >\Footer.jsp > > So far, so good. Next, to make it easier to edit the content on each page > and to make it easier to have uniform consistency of pages, EVERY > index.jsp > is IDENTICAL ~ > > index.jsp > - > <%@ include file="/Global/Banner.jsp" %> > > > <%@ include file="/Global/Menu.jsp" %> > <%@ include file="body.jsp" %> > > > <%@ include file="/Global/Footer.jsp" %> > > > Using this, the final file structure is ~ > > index.jsp (Homepage) > body.jsp > \Company\index.jsp > \body.jsp > \Products\index.jsp > \body.jsp > \Services\index.jsp > \body.jsp > \Feedback\index.jsp > \body.jsp > \Global\Banner.jsp >\Menu.jsp >\Footer.jsp > > > And you know, this system works for me. To edit any page, all I have to > do > it edit the body.jsp which means that I have little risk of messing up the > template. > > The problem with this is obviously all those identical index.jsp's !! If I > have to make a change to the layout, then I have to change all of them. > That's obviously BAD but is a simple search/replace because they're all > identical anyway. > > I know I can use Velocity within JSP in order to use one template for all > the JSPs but I still end up with literally hundreds of identical index.jsp > pages for a real site with many levels of subdirectories. It'll be easier > to > change the template for layout but really whenever I see repetition on the > scale of all those index.jsp's I think something's inefficient. > > There has to be a better way of doing this, is there ? > > Soefara. > > _ > Chat with friends online, try MSN Messenger: http://messenger.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://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
Tomcat deployment question
We are due to go live Thursday night (!) with a few select users. We thought it would be a simple matter of jarring up the classes for deployment under Tomcat 4.0. But, for some reason, it isn't working. We've tried jars, tars and wars, and seemingly put them everywhere under the Tomcat tree. Can someone tell me what we are doing wrong? Thanks! -- Jim * Jim Lindsay * My-Soccer-League.com * [EMAIL PROTECTED] * 510-527-8025 * 510-528-8317 (fax) === 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
Better way to build a site than or with JSPs ?
I've experimented and have found one way to templated site with JSP but there has to be a better way. First, I'll explain what I do at the moment. Consider a very simplistical sitemap ~ Homepage +-Company +-Products +-Services +-Feedback I've created a folder structure to represent this. And the default page in each folder is index.jsp. Each page (index.jsp) shares the same banner (Banner.jsp), footer (Footer.jsp) and navigation menu (Menu.jsp) which go in the Global folder. So, this gives me the following ~ index.jsp (Homepage) \Company\index.jsp \Products\index.jsp \Services\index.jsp \Feedback\index.jsp \Global\Banner.jsp \Menu.jsp \Footer.jsp So far, so good. Next, to make it easier to edit the content on each page and to make it easier to have uniform consistency of pages, EVERY index.jsp is IDENTICAL ~ index.jsp - <%@ include file="/Global/Banner.jsp" %> <%@ include file="/Global/Menu.jsp" %> <%@ include file="body.jsp" %> <%@ include file="/Global/Footer.jsp" %> Using this, the final file structure is ~ index.jsp (Homepage) body.jsp \Company\index.jsp \body.jsp \Products\index.jsp \body.jsp \Services\index.jsp \body.jsp \Feedback\index.jsp \body.jsp \Global\Banner.jsp \Menu.jsp \Footer.jsp And you know, this system works for me. To edit any page, all I have to do it edit the body.jsp which means that I have little risk of messing up the template. The problem with this is obviously all those identical index.jsp's !! If I have to make a change to the layout, then I have to change all of them. That's obviously BAD but is a simple search/replace because they're all identical anyway. I know I can use Velocity within JSP in order to use one template for all the JSPs but I still end up with literally hundreds of identical index.jsp pages for a real site with many levels of subdirectories. It'll be easier to change the template for layout but really whenever I see repetition on the scale of all those index.jsp's I think something's inefficient. There has to be a better way of doing this, is there ? Soefara. _ Chat with friends online, try MSN Messenger: http://messenger.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://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
Please help For Tomcat and JAXM
Hi Every body I am running Tomcat 4.0 for the SOAP Agent, when i send a request from the browser (http://localhost:8080/simple/index.html), deployed war file working fine. but if i send request with SOAP Client (using JAXM API), getting following Exception PLease help if any body have some idea Or if there is any other mailing list for the JAXM API User do send me Sending message to URL: http://localhost:8080/simple/index.html javax.xml.soap.SOAPException: Invalid Content-Type:text/html at com.sun.xml.messaging.soap.MessageImpl.verify(MessageImpl.java:144) at com.sun.xml.messaging.soap.MessageImpl.(MessageImpl.java:77) at com.sun.xml.messaging.soap.MessageFactoryImpl.createMessage(MessageFactoryIm pl.java:37) at com.sun.xml.messaging.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection. java:255) at com.sun.xml.messaging.client.p2p.HttpSOAPConnection$PriviledgedPost.run(Http SOAPConnection.java:110) at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.messaging.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection. java:89) at StandAlone.main(StandAlone.java:91) javax.xml.soap.SOAPException: Unable to internalize message at com.sun.xml.messaging.soap.MessageImpl.(MessageImpl.java:120) at com.sun.xml.messaging.soap.MessageFactoryImpl.createMessage(MessageFactoryIm pl.java:37) at com.sun.xml.messaging.client.p2p.HttpSOAPConnection.post(HttpSOAPConnection. java:255) at com.sun.xml.messaging.client.p2p.HttpSOAPConnection$PriviledgedPost.run(Http SOAPConnection.java:110) at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.messaging.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection. java:89) at StandAlone.main(StandAlone.java:91) javax.xml.soap.SOAPException: java.security.PrivilegedActionException <> at com.sun.xml.messaging.client.p2p.HttpSOAPConnection.call(HttpSOAPConnection. java:93) at StandAlone.main(StandAlone.java:91) Thanks Ajit Have a nice day :-( === 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
how to force tomcat to reload a JSP page ?
In my servers.xml I already have the following If I understand this correctly, 'reloadable="true"' means that all JSPs will be reloaded, including JSPs which are "included" in other JSPs using the include directive. Is this right ? JSPs which are 'included' using the jsp:include tag are always reloaded. However, despite the 'reloadable="true"', my included JSPs are sometimes not reloaded... and sometimes they are. There's no consistency. Do you know why this is the case and how I can force it to reload ? I'm using Tomcat 4.0 Thank you Soefara. _ Send and receive Hotmail on your mobile device: http://mobile.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://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
Reverse Proxy and sendRedirect
hi, We have configured a reverse proxy, to connect one of our internal application and database servers to the internet. Now we have problems with JSP-based applications and rewrite commands which were issued from those apps: The Login page is avaliable under http://reverse-proxy.domain/skillset/login.jsp if the username and password fields are filled and the submit button is pressed, the JSP login page wants to redirect to the start page of the application. The effect is, for the user who connects to the login page via the reverse proxy gets a redirect command is not working. It says page can\'t be displayed. (If I commnet out this portion of response.sendRedirect() it works, but i need to redirect that page) I also useed the following, 1. Complete URL starting from http:8080.. 2. RequestDispatcher rd = request.getRequestDispatcher(\"skillHome1.jsp\"); 3 And JSP Forward tag But none are working. Is it some thing that I can\'t use, sendRedirect when I am using reverse proxy?? Thanks in anticipation, Smita - This mail helped a tree grow. Know more at http://green.sify.com Take the shortest route to success! Click here to know how http://education.sify.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: functionaly for buffer management
I'd recommend using the Jakarta Velocity template engine for this. -Richard At 12:24 PM 2/26/2002 -0800, you wrote: >please help me out > >Functionality: > >Input is a Template file>>we have to put into buffer>> >inserting the data respective positions/ manipulation >of template > > > >Following methods needs to put in generic class for >manipulation. > > >1) loadFile(p_FilePath As String) :Loading the file >into buffer >2) saveFile(p_FilePath As String) : to save the >document in Respective file path >3) Insert()to insert the data in respective location >4) ReplaceText(ByVal p_Find As String, _ ByVal >p_Replace As String) : to replace patterns with Values >5) Find(ByVal p_Text As String): for finding >particular patter >6) SelectAll(): for selecting all document in string >7) SelectRange(Optional ByVal p_Start As Integer = 1, >_ Optional ByVal p_End As Integer = 0) >8) SelectTaggedText(ByVal p_StartTag As String, ByVal >p_EndTag As String) >9) SelectOff() >10) Cut() : to cut the selected area >11) Delete(Optional ByVal p_TextPattern As String = >""): to delete the data in located araea >12) Paste() : it has to paste at Cursor position >13) MoveCursor(p_CursorLocation As Integer): it has to >select the cursor position > > > >__ >Do You Yahoo!? >Yahoo! Greetings - Send FREE e-cards for every occasion! >http://greetings.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
Re: functionaly for buffer management
Any specific problems you're having here? 1) Use java.io.FileReader and StringBuffer 2) Use java.io.FileWriter 3) StringBuffer has an insert() method 4) You'll have to write this yourself, but it's easy 5) String has an indexOf() method 6-10) Should be simple once you have the 1-5 working And what is with the Visual Basic method signatures? === 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
functionaly for buffer management
please help me out Functionality: Input is a Template file>>we have to put into buffer>> inserting the data respective positions/ manipulation of template Following methods needs to put in generic class for manipulation. 1) loadFile(p_FilePath As String) :Loading the file into buffer 2) saveFile(p_FilePath As String) : to save the document in Respective file path 3) Insert()to insert the data in respective location 4) ReplaceText(ByVal p_Find As String, _ ByVal p_Replace As String) : to replace patterns with Values 5) Find(ByVal p_Text As String): for finding particular patter 6) SelectAll(): for selecting all document in string 7) SelectRange(Optional ByVal p_Start As Integer = 1, _ Optional ByVal p_End As Integer = 0) 8) SelectTaggedText(ByVal p_StartTag As String, ByVal p_EndTag As String) 9) SelectOff() 10) Cut() : to cut the selected area 11) Delete(Optional ByVal p_TextPattern As String = ""): to delete the data in located araea 12) Paste() : it has to paste at Cursor position 13) MoveCursor(p_CursorLocation As Integer): it has to select the cursor position __ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.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: JavaMail with attachments
You might find someone here, but I'd bet you'd have better luck in the JavaMail Interest Group. try http://archives.java.sun.com/javamail-interest.html (*Chris*) - Original Message - From: "Rodelio A. Pagui" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 25, 2002 4:54 PM Subject: [JSP-INTEREST] JavaMail with attachments > Hi, all! > > I hope somebody can help me out on how to handle attachments with JavaMail. > > Thanks. > > Rodel > > === > 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!? Get your free @yahoo.com address at http://mail.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: Hide a directory with JSP
Bartha Gabor wrote: > HI everybody, > > I'm new in this mailinglist, I hope this is not an offtopic problem. > I'm using Tomcat and .jsp pages for managing user access to some of my > files. I would like to hide my data in a directory which is forbidden > for everybody expect registered users who have password - my first page > is a login.jsp where users can login. > How can I hide the directory to be forbidden for everybody except for > logged users using JSP? If the set of valid users can be maintained by an admin (instead of the users themselves), I suggest that you use container-controlled access control for this. You can declare which pages should be protected and which authentication mechanism should be used in the web.xml file for the application: ... secret /protected/* validUser BASIC Protected Space validUser ... With this declaration, anyone who tries to access a page under a directory named "protected" will be prompted for a username and password by the browser (using the Basic Authentication scheme). If the information matches a user defined by the container as a member of the role "validUser", the page will be returned. How users are assigned to roles varies between containers. For Tomcat, a simple default is to define them in a file named tomcat-users.xml in the Tomcat "conf" directory. For details about this, I suggest you look for online tutorials or books, starting with the links at the bottom of this mail. The same if you must roll your own authentication and access control functions. It's way too much to describe in detail in a mail. Hans -- Hans Bergsten [EMAIL PROTECTED] Gefion Software http://www.gefionsoftware.com JavaServer Pageshttp://TheJSPBook.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: Sorry but it's urgent: How to get window width at IE 5?
this should do it document.write(screen.availWidth); -Original Message- From: Bommakanti, Vamsee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 6:06 PM To: [EMAIL PROTECTED] Subject: Re: Sorry but it's urgent: How to get window width at IE 5? Try window.resizeTo(x,y) in IE You can set the length(y) and width(x) Hope this helps Thanks Vamsee -Original Message- From: "Villén Pizarro, Julia" [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 11:23 AM To: [EMAIL PROTECTED] Subject: Sorry but it's urgent: How to get window width at IE 5? Hi all: ¿Anyone knows how to get the navigator window width at IE 5 (using JavaScript)? I tried "document.body.width" but it doesn't work since I need window width to define the size of frames, and a page made out of frames doesn't have body or it has it underneath the frames so this sentence won't work. At NS works perfectly width "window.innerWidth", but not at IE. Know any method like this at IE? Sorry for using this forum but I didn't get an answer in the specific ones and I'm a bit desperated. Other question by the way: a link to your favorite JSP advanced tutorial? Thanks in advance, Julia ==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
Re: Sorry but it's urgent: How to get window width at IE 5?
Try window.resizeTo(x,y) in IE You can set the length(y) and width(x) Hope this helps Thanks Vamsee -Original Message- From: "Villén Pizarro, Julia" [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 26, 2002 11:23 AM To: [EMAIL PROTECTED] Subject: Sorry but it's urgent: How to get window width at IE 5? Hi all: ¿Anyone knows how to get the navigator window width at IE 5 (using JavaScript)? I tried "document.body.width" but it doesn't work since I need window width to define the size of frames, and a page made out of frames doesn't have body or it has it underneath the frames so this sentence won't work. At NS works perfectly width "window.innerWidth", but not at IE. Know any method like this at IE? Sorry for using this forum but I didn't get an answer in the specific ones and I'm a bit desperated. Other question by the way: a link to your favorite JSP advanced tutorial? Thanks in advance, Julia ==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
Sorry but it's urgent: How to get window width at IE 5?
Hi all: ¿Anyone knows how to get the navigator window width at IE 5 (using JavaScript)? I tried "document.body.width" but it doesn't work since I need window width to define the size of frames, and a page made out of frames doesn't have body or it has it underneath the frames so this sentence won't work. At NS works perfectly width "window.innerWidth", but not at IE. Know any method like this at IE? Sorry for using this forum but I didn't get an answer in the specific ones and I'm a bit desperated. Other question by the way: a link to your favorite JSP advanced tutorial? Thanks in advance, Julia ==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: WAP /TOMCAT 4.01
Bonjour, Nothing particular: WML pages are the same. Just different MIME... For example, in a jsp: <%@ page contentType="text/vnd.wap.wml" %> That's all Bonne journee, Nicolas Silber*zahn Digital Airways Everywhere Technologies <100% Java, Mobile, Offline aware>Wapaka Browser www.DigitalAirways.com Hey! Want to see the Header your WAP phone/Gateway sends to the server? Give your email at this WAP URL and you will receive it... http://www.DigitalAirways.com/waphead/default.asp >-Message d'origine- >De : A mailing list about Java Server Pages specification and reference >[mailto:[EMAIL PROTECTED]]De la part de Panayiotis Periorellis >Envoye : mardi 26 fevrier 2002 16:12 >A : [EMAIL PROTECTED] >Objet : WAP /TOMCAT 4.01 > > >I was just wondering whether tomcat 4.01 can be used to accept and >process wap requests.. > > >I don't think this is something we have discussed so if anybody has >implemented WAP pages can you please let me know: > >A) where in tomcat do we place the wml >B) where do we place wmls >C) do we need any further patches to implement a WAP server... > > >Regards >Panos > >= >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
Re: WAP /TOMCAT 4.01
Hi Panos I don't know if Tomcat 4.01 can act as a WAP gateway... Assuming that it can't then, as with earlier Tomcat versions, you need a WAP gateway as well. When you send your WML out, the gateway encodes it into WBXML, which is a binary encoded XML. The gateway receives WAP requests and passes them on to your Tomcat. You can process them there with JSP pages just as you would process any other XML. One problem is if you need to be able to distinguish between incoming requests from WAP devices and HTML browsers. At the moment you have to check the user agent header, and every WAP device will give you a different header. It may be easier to detect IE and Netscape and assume everything else is WAP. But beware, WAP devices vary considerably in what they can do and how they treat WML. Wrox do a good WAP book... Nokia (http://www.forum.nokia.com/main.html) sell a gateway, and I believe there are open source gateways. There must be a WAP mailing list somewhere... regards Mark Lines-Davies -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Panayiotis Periorellis Sent: 26 February 2002 15:12 To: [EMAIL PROTECTED] Subject: WAP /TOMCAT 4.01 I was just wondering whether tomcat 4.01 can be used to accept and process wap requests.. I don't think this is something we have discussed so if anybody has implemented WAP pages can you please let me know: A) where in tomcat do we place the wml B) where do we place wmls C) do we need any further patches to implement a WAP server... Regards Panos = 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 * The information contained in this message or any of its attachments may be privileged and confidential and intended for the exclusive use of the addressee. If you are not the addressee any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited * === 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
Hide a directory with JSP
HI everybody, I'm new in this mailinglist, I hope this is not an offtopic problem. I'm using Tomcat and .jsp pages for managing user access to some of my files. I would like to hide my data in a directory which is forbidden for everybody expect registered users who have password - my first page is a login.jsp where users can login. How can I hide the directory to be forbidden for everybody except for logged users using JSP? Thanks, Gabor Bartha === 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
WAP /TOMCAT 4.01
I was just wondering whether tomcat 4.01 can be used to accept and process wap requests.. I don't think this is something we have discussed so if anybody has implemented WAP pages can you please let me know: A) where in tomcat do we place the wml B) where do we place wmls C) do we need any further patches to implement a WAP server... Regards Panos ==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: JavaMail with attachments
hi, I had used this is JSP, hope this would be help full to you.. Smita If it is sending the attachment it is some thing like this, ** //Text part BodyPart bodyPart1=new MimeBodyPart(); bodyPart1.setText(\"Sedning mail from JSP, please ignore this \"); //file part BodyPart bodyPart2=new MimeBodyPart(); FileDataSource fileDataSource=new FileDataSource(\"/usr/local/weblogic/myserver/public_html/index.html\"); bodyPart2.setDataHandler(new DataHandler(fileDataSource)); bodyPart2.setFileName(fileDataSource.getName()); Multipart multipart = new MimeMultipart(); multipart.addBodyPart(bodyPart1); multipart.addBodyPart(bodyPart2); *** And if it is receving the attachments it is some thing as follows, *** if(message[i].isMimeType(\"multipart/*\")) { Multipart multipart=(Multipart)message[i].getContent(); for(int j=0;j <%=extContent%> <% } else if(p.isMimeType(\"text/plain\")) { extContent=p.getContent().toString(); %> <% extContent=extContent+\">>\"; String newMessage=\"\"; StringTokenizer stTok=new StringTokenizer(extContent,\">>\"); while(stTok.hasMoreTokens()) { String part=stTok.nextToken(); newMessage=newMessage+\"\"+part; // out.println(\"\\n\"+part); extContent=newMessage; } %> <%=newMessage%> <% } else if(p.isMimeType(\"message/rfc822\")) { extContent=p.getContent().toString(); %> <%=extContent%> <% } else if(p.isMimeType(\"multipart/*\")) { Multipart mp=(Multipart)p.getContent(); Part pNew=mp.getBodyPart(0); extContent=pNew.getContent().toString(); %> <%=extContent%> <% } else { String fileName=p.getFileName(); java.io.File file=new java.io.File(\"/usr/local/weblogic/myserver/public_html/JavaMail/\", fileName);
Re: Taglib in Tomacat.
Hi, Thanks a lot. It worked. What I did is, as you have suggested kept jar in WEB-INF/lib and tld in WEB-INF/tlds and copied web.xml from examples folder to Skillset/Web-INF folder. And it worked. Thanks a million for your inputs, I guess, I was doing some minor error in giving the paths. Thanks again, Smita Hans Bergsten <[EMAIL PROTECTED]>: > Smita Kotnis wrote: > > > Hi thanks for reply, > > > > I fear, my mail server is adding the backslashes. I actually have not > added these in my code. I tried with your suggestions and still it is > not working. I have put my jar file in this path, > > E:jakarta-tomcat-3.2.3webappsskillsetWEB-INFlib > > > > is it okay? Is this is the correct place to keep that jar? > > > Yes, like I said, the JAR file must be stored in the WEB-INF/lib > directory. This is because it contains all the Java class files for > the tag library, and the container looks for JAR files in the > WEB-INF/lib directory for the application. > > > After this i used the tag as, > > <%@ taglib uri=\\\"/WEB-INF/lib/uptag.jar\\\" prefix=\\\"up\\\" %> > > > Assuming this directive is used in a JSP page located under > E:\\jakarta-tomcat-3.2.3\\webapps\\skillset, and that the JAR file > contains the TLD in META-INF/taglib.tld, this should work fine. > > > Is any thing else is to be done? Like putting tld file some where. > > Right now it is at one place (WEB-INF/tlds).. > > Like I said earlier, you can point to the TLD file instead of the > JAR. In fact, if the JAR does not contain the TLD, this is what > you have to do. If you have the TLD in > E:\\jakarta-tomcat-3.2.3\\webapps\\skillset\\WEB-INF\\tlds\\mylib.tld, > use > <%@ taglib uri=\"/WEB-INF/tlds/mylib.tld\" prefix=\"up\" %> > > Any one of these alternatives should work. And they do. I\'ve done > it many times, with many different web containers, and it\'s how the > JSP specification says it should be done. All you have to do is > be very careful with the typing the paths correctly, including > upper and lowercase letters. > > > I am really not understanding what is happening here. This tag > > I am using for uploading a file from client. Alternatively, can > > you please suggest me some servlets for uploading a file? JSP Smart > > upload is distorting the tables of a word file. > > > You can always search for \"file upload servlet\" or something similar > on Google, but that\'s not really a solution to this problem. I > assume you want to use tag libraries for other things eventually, > and then you have to figure out what you\'re doing wrong with the > taglib directive anyway. > > Hans > -- > Hans Bergsten [EMAIL PROTECTED] > Gefion Software http://www.gefionsoftware.com > JavaServer Pageshttp://TheJSPBook.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 > - This mail helped a tree grow. Know more at http://green.sify.com Take the shortest route to success! Click here to know how http://education.sify.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: SQL statement.
Well you are going to have to use group by and a decode statement. You want the actual sql statement why do u not go ask someone in a sql group. but something like SELECT MAX(OrderNum),requstID FROM TRequest group by requestID,OrderNum might work. dont know if this works but hey did it in 10 secs - Original Message - From: "Next Step" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 22, 2002 9:13 PM Subject: Re: SQL statement. > At 01:43 PM 2/21/2002 -0500, you wrote: > >Try this: > > > >SELECT RequestID FROM TRequest > >WHERE OrderNum = (SELECT MAX(OrderNum) FROM TRequest); > > It will only retrieve *one* record which has highest OrderNum. > What i want is to retrieve *every* unique RequestID which has highest > OrderNum, say for REQ1 return Ordernum 1, REQ4 return 4. > Sorry if its not clear. > > TIA > > === > 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