Open JSP page by user name

Hi Experts,
I have a login servlet LoginServlet.java and an user welcome screen welcome.jsp. When user login and after user validation i want to open welcome.jsp like
www.wesitename.com/username instead of www.wesitename.com/welcome.jsp. How can i do it please suggest me.
Edited by: live_to_java on Jun 18, 2010 5:29 AM

That's not strange cause You set welcome mapping to "/*" so it also catches your index.jsp. I've modified my code and used filter, here it goes:
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
     xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
     <display-name>TestServlet</display-name>
     <filter>
          <filter-name>accessFilter</filter-name>
          <filter-class>org.opal.test.filters.AccessFilter</filter-class>
     </filter>
     <filter-mapping>
          <filter-name>accessFilter</filter-name>
          <url-pattern>/*</url-pattern>
     </filter-mapping>
     <servlet>
          <servlet-name>loginServlet</servlet-name>
          <servlet-class>org.opal.test.servlets.LoginServlet</servlet-class>
     </servlet>
     <servlet-mapping>
          <servlet-name>loginServlet</servlet-name>
          <url-pattern>/login</url-pattern>
     </servlet-mapping>
     <servlet>
          <servlet-name>index</servlet-name>
          <jsp-file>/index.jsp</jsp-file>
     </servlet>
     <servlet-mapping>
          <servlet-name>index</servlet-name>
          <url-pattern>/index/*</url-pattern>
     </servlet-mapping>
     <servlet>
          <servlet-name>welcome</servlet-name>
          <jsp-file>/welcome.jsp</jsp-file>
     </servlet>
     <servlet-mapping>
          <servlet-name>welcome</servlet-name>
          <url-pattern>/*</url-pattern>
     </servlet-mapping>
</web-app>AccessFilter.java
package org.opal.test.filters;
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
public class AccessFilter implements Filter {
     public void init(FilterConfig fc) throws ServletException {
     public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
          HttpServletRequest request = (HttpServletRequest) req;
          HttpServletResponse response = (HttpServletResponse) res;
          HttpSession session = request.getSession();
          String user = (String) session.getAttribute("user");
          if (request.getRequestURI().contains("login")) {
               chain.doFilter(request, response);
               return;
          if (user == null) {
               RequestDispatcher rd = request.getRequestDispatcher("/index");
               rd.forward(request, response);
          } else {
               chain.doFilter(request, response);
               return;
     public void destroy() {
}LoginServlet.java
package org.opal.test.servlets;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
public class LoginServlet extends HttpServlet {
     private static final long serialVersionUID = -215349891382765184L;
     @Override
     protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
          processRequest(req, resp);
     @Override
     protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
          processRequest(req, resp);
     private void processRequest(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
          HttpSession session = req.getSession();
          session.setAttribute("user", req.getParameter("login"));
          resp.sendRedirect(req.getContextPath() + "/" + req.getParameter("login"));
}index.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
     <form action="login" method="post">
          <input type="text" value="Opal" name="login">
          <input type="submit" value="ok">
     </form>
</body>
</html>welcome.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
     Welcome
     ${sessionScope.user}
</body>
</html>

Similar Messages

  • Opening JSP pages in Jdeveloper

    Hi all
    I am using Jdeveloper 10g preview for my project development. Lately I am getting an exception whenever I try to open JSP pages. I cannot get either the design view or the code view. My component palette also shows that it is inactive. The exception is as follows.
    java.lang.NullPointerException
         at oracle.jdevimpl.webapp.view.PositionManager.createSingleSourcePosition(PositionManager.java:2225)
         at oracle.jdevimpl.webapp.view.PositionManager.getViewPositions(PositionManager.java:537)
         at oracle.jdevimpl.webapp.view.PositionManager.createDocumentPositionInfo(PositionManager.java:465)
         at oracle.jdevimpl.webapp.view.PositionManager.setDocPosition(PositionManager.java:766)
         at oracle.jdevimpl.webapp.controller.EditorController.moveSinglePosition(EditorController.java:852)
         at oracle.jdevimpl.webapp.controller.EditorController.moveMultiplePosition(EditorController.java:872)
         at oracle.jdevimpl.webapp.controller.EditorController.updatePositions(EditorController.java:150)
         at oracle.jdevimpl.webapp.controller.EditorController.enable(EditorController.java:778)
         at oracle.jdevimpl.webapp.controller.EditorController.setEnabled(EditorController.java:127)
         at oracle.jdevimpl.webapp.editor.EditorImpl.setEnabled(EditorImpl.java:74)
         at oracle.jdevimpl.webapp.editor.EditorImpl.showContent(EditorImpl.java:104)
         at oracle.jdevimpl.webapp.editor.html.HtmlEditor.updateDisplay(HtmlEditor.java:565)
         at oracle.jdevimpl.webapp.editor.WebAppEditor.open(WebAppEditor.java:125)
         at oracle.ideimpl.flateditor.EditorState.openEditor(EditorState.java:237)
         at oracle.ideimpl.flateditor.EditorState.createEditor(EditorState.java:141)
         at oracle.ideimpl.flateditor.EditorState.getOrCreateEditor(EditorState.java:84)
         at oracle.ideimpl.flateditor.SplitPaneState.canSetEditorStatePos(SplitPaneState.java:243)
         at oracle.ideimpl.flateditor.SplitPaneState.setCurrentEditorStatePos(SplitPaneState.java:206)
         at oracle.ideimpl.flateditor.TabGroupState.createSplitPaneState(TabGroupState.java:113)
         at oracle.ideimpl.flateditor.TabGroup.addTabGroupState(TabGroup.java:230)
         at oracle.ideimpl.flateditor.FlatEditorManager.createEditor(FlatEditorManager.java:1174)
         at oracle.ideimpl.flateditor.FlatEditorManager.createEditorInFrame(FlatEditorManager.java:1147)
         at oracle.ideimpl.flateditor.FlatEditorManager.openEditorInFrame(FlatEditorManager.java:1078)
         at oracle.ideimpl.flateditor.FlatEditorManager.openDefaultEditorInFrame(FlatEditorManager.java:1053)
         at oracle.ideimpl.flateditor.FlatEditorManager.whenOpenEditor(FlatEditorManager.java:2230)
         at oracle.ideimpl.flateditor.FlatEditorManager.handleDefaultAction(FlatEditorManager.java:1914)
         at oracle.ide.ContextMenu.fireDefaultAction(ContextMenu.java:378)
         at oracle.ideimpl.explorer.BaseTreeExplorer.fireDefaultAction(BaseTreeExplorer.java:1277)
         at oracle.ideimpl.explorer.BaseTreeExplorer.dblClicked(BaseTreeExplorer.java:1662)
         at oracle.ideimpl.explorer.BaseTreeExplorer.mouseReleased(BaseTreeExplorer.java:1683)
         at oracle.ideimpl.explorer.CustomTree.processMouseEvent(CustomTree.java:171)
         at java.awt.Component.processEvent(Component.java:4931)
         at java.awt.Container.processEvent(Container.java:1566)
         at java.awt.Component.dispatchEventImpl(Component.java:3639)
         at java.awt.Container.dispatchEventImpl(Container.java:1623)
         at java.awt.Component.dispatchEvent(Component.java)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
         at java.awt.Container.dispatchEventImpl(Container.java:1609)
         at java.awt.Window.dispatchEventImpl(Window.java)
         at java.awt.Component.dispatchEvent(Component.java)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:452)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    any comments is appretiated.
    Cheers
    Kanag

    It looks like a bug. Are you able to paste the contents of one of the pages that is causing the exceptions? That may help illuminate the issue.
    Thanks,
    Steve

  • Problems opening JSP pages through netbeans

    I recently upgraded from netbeans 5.5RC1 to netbeans 5.5 and am no longer able to open JSP pages. I am still able to edit java pages and I am still able to compile/build packages, however I get the following error when attempting to open the JSP pages. Any input/help would be appreciated.
    Thanks,
    java.lang.StackOverflowError
         at java.io.Win32FileSystem.normalizePrefix(Win32FileSystem.java:76)
         at java.io.Win32FileSystem.normalize(Win32FileSystem.java:107)
         at java.io.Win32FileSystem.normalize(Win32FileSystem.java:170)
         at java.io.File.<init>(File.java:196)
         at org.netbeans.modules.masterfs.ResourcePath.getFile(ResourcePath.java:64)
         at org.netbeans.modules.masterfs.MasterFileObject.isValid(MasterFileObject.java:86)
         at org.netbeans.modules.masterfs.Cache.get(Cache.java:68)
         at org.netbeans.modules.masterfs.Cache.getOrCreate(Cache.java:89)
         at org.netbeans.modules.masterfs.MasterFileObject.getParent(MasterFileObject.java:537)
         at org.openide.filesystems.FileUtil.isParentOf(FileUtil.java:971)
         at org.netbeans.modules.java.freeform.Classpaths.findClassPathImpl(Classpaths.java:139)
         at org.netbeans.modules.java.freeform.Classpaths.access$000(Classpaths.java:85)
         at org.netbeans.modules.java.freeform.Classpaths$1.run(Classpaths.java:123)
         at org.openide.util.Mutex.readAccess(Mutex.java:227)

    This happens very frequently during development, I just do ctrl+F5 in IE to keep refreshing till I finally get a response back from the jsp or servlet... usually it takes about 2-4 refreshes to get the jsp to respond and after that its smooth till you change the jsp or restart Apache. Also this problem, in my experience, is associated with Apache forwarding requests to OSE via mod_ose and I dont see this problem if I access the jsp directly using the database listener http endpoint.
    Hope this helps.

  • Tomcat not opening jsp pages

    I installed apache 2 and tomcat and configured them both.... i installed mod_jk as the connector
    But when i open a jsp page, i get
    HTTP Status 404 - /~scriptdevil/hello.jsp
    type Status report
    message /~scriptdevil/hello.jsp
    description The requested resource (/~scriptdevil/hello.jsp) is not available.
    Apache Tomcat/5.5PHP files open just fine.
    How should i use it??

    hey.. noticed one more thing.. stuff works when i put
    it in my file:///var/lib/tomcat-5.5/webapps/ROOT/
    folder .. so i think i havent set my user properly..
    any pointers??I don't think you should be putting stuff in ROOT.
    Create your own web context and put it under /webapps.
    %

  • Javascript & JSP - prompt for user name

    I want to prompt the user for their name at the beginning.
    Then I want to save that value in the JSP session because eventually it will be saved along with a bunch of other information into a database table.
    How can I get the JSP session attribute to save the user's input from a Javascript prompt?

    Oh, so
    the javascript part
    name = prompt('USERNAME',' ');
    Can't interact with JSP
    <%
    String user =
    session.setAttribute("userName", user);
    %>
    That's what I want to know how does the
    user = name
    So I guess maybe a regular form would be better for what i need?

  • Error opening jsp page

    I have some strange error and after spending some time fixing it, cannot find a solution.
    Here is an error: *[ServletException in:/AnnuityCodes-body.jsp] gov.nyc.fisa.wbas.view.WelfareColView'*
    That errror get displayed right after I click a "menu" link to open the page representing by AnnuityCodes-body.jsp.
    I can try to explain what I'm doing:
    I have an action class that forwards to that jsp.
    Here is a fragment in action class:
    AnnuityColView cView = new AnnuityColView();
    AnnuityBO bo = new AnnuityBO();
    cView = bo.searchAnnuity();//returns AnnuityColView object
    session.setAttribute("sCols",cView);
    I have the following bean declaration in jsp:
    <jsp:useBean id="menu" class="gov.nyc.fisa.wbas.navigation.Menu" scope="session"/>
    <jsp:useBean id="annuityPropsForm" class="gov.nyc.fisa.wbas.form.AnnuityCodesPropsForm" scope="request"/>
    <jsp:useBean id="searchAnnuityForm" class="gov.nyc.fisa.wbas.form.AnnuitySearchForm" scope="request"/>
    <jsp:useBean id="sCols" class="gov.nyc.fisa.wbas.view.AnnuityColView" scope="session"/>
    <jsp:useBean id="singView" class="gov.nyc.fisa.wbas.view.AnnuitySingleRecordView" scope="request"/>
    <jsp:useBean id="errorList" class="gov.nyc.fisa.wbas.view.AnnuityReportView" scope="request"/>I do not have any references to : WelfareColView object. I checked it a few times
    I also have another jsp that has following bean declarations:
    <jsp:useBean id="menu" class="gov.nyc.fisa.wbas.navigation.Menu" scope="session"/>
    <jsp:useBean id="wbasPropsForm" class="gov.nyc.fisa.wbas.form.WelfareCodesPropsForm" scope="request"/>
    <jsp:useBean id="searchFundsForm" class="gov.nyc.fisa.wbas.form.WelfareSearchForm" scope="request"/>
    <jsp:useBean id="sCols" class="gov.nyc.fisa.wbas.view.WelfareColView" scope="session"/>
    <jsp:useBean id="singView" class="gov.nyc.fisa.wbas.view.WelfareSingleRecordView" scope="request"/>
    <jsp:useBean id="errorList" class="gov.nyc.fisa.wbas.view.WelfareReportView" scope="request"/>Another action class forwards to the jsp that has the above fragment.
    I''m trying to figure out what's wrong, and have no idea so far.
    Can anyone tell me what's wrong?
    Thank you.
    Edited by: piterskiy on Jan 10, 2008 9:09 AM

    you need not be having any refrence to the class that shows error.
    But the classes that you have used must be having some kind of refrences.
    I cant say the real error. If the package is a hird party one then you must be missing some parameters.

  • Redirect to the jsp page after user authenticated successfully  …

    Here is the requirement …
    I’m using “JAAS – Custom Login Module” for user authentication.
    I have few questions in Portal Logon process …
    1. Exactly at what point I can conclude that the user has been authenticated successfully, because I have to redirect the user to some other page for the first time logon to enter some information, subsequent logins shouldn’t be redirected. (I can update flag upon entering information).
    2. Where should I add my redirection code? Is it in my JASS Custom Login Module?
    If yes, how can I do that ? I’m more consider on “where should I add it”?
    3. Do I need to change my “UmLogonPage.jsp” to complete my requirement?
    4. Once after entering the Logon information, who will call my JASS – Custom Login Module for authentication? If authentication has failed who will return the control back to the “umLogonPage.jsp”?
    5. In my JASS Custom Login Module, I have no redirections except having logic for authentication process, and some Login Exceptions are thrown for failure logins.
    6. Who will catch these exceptions for failure logins to redirect back to the “umLogonPage.jsp”.
    7. Finally I like to know where can I add my redirection logic once the user has been authenticated successfully?
    8. last but not least can any of the experts explain the whole login process (using JASS module)? How the control goes from one component to another?
    Any kind of help is appreciated.
    Points can be awarded for useful answers.
    Thanks
    MMK

    Thanks a lot for your valuable reply.
    yes what you said was correct, storing information in R/3 System and getting the details from FM using Connector framework.
    You said i have to modify "header.jsp", can you please tell which .par file should i get to modify?
    one more question to you ... i have provide custom logon error messages to the user ... i did all the modification in logon.par and deployed in EP 6 .. working fine .. i can able to see "User ID Missing" , "Password Missing" etc ..
    when i place same peace of code in EP 7 it always displaying "User Authentication failed". can u guess what whould be the problem?
    Thanks
    MMK

  • Will not open messages says invalid user name when i put in new name it dose not do anything going round in circules

    cannot get my messages it says invalid user retry or insert new password but still no change

    What do you mean by 'put in new name'?
    Username = full email address
    This should be entered here:
    Tools > Account Settings
    select the account name on the left
    Account name: full email address
    Your name: Type your name
    Email address: enter full email address
    Are you trying to set up a new mail account?
    OR
    has this mail account been working ok up until now?

  • HOW to send a value to another jsp page

    HOW to send a value to another jsp page, like user name in one jsp page to another jsp page

    In the most simplest form...
    // pageA.jsp
    <html>
    <body>
    <form action="pageB.jsp" method="post">
    <b>First Name:</b> <input type="text" name="FNAME" value="Joe">
    <input type="submit" value="Submit">
    </form>
    </body>
    </html>
    // pageB.jsp
    <html>
    <body>
    <b>Name:<b> <%=request.getParameter("FNAME")%>
    </body>
    </html>

  • Error While opening a JSP page from inside form window

    Hi,
    I am using Oracle EBS 12.0.4 and using IE 7 as my browser.
    Now when i am trying to open a jsp page form EBS Home page (after login) it is opening perfectly.The problem occurs when i tried to open jsp pages from inside form window.
    E.g. From the home page when i tried to open a jsp page "Control Purchasing Periods" which is assigned in one of our custom responsibility(Manager Systems-->PO Super User-->Set up-->Financials-->Accounting-->Control Purchasing Periods) it opens a new log in page for the EBS. When i logged in it is showing
    Error
    You have insufficient privileges for the current operation. Please contact your System Administrator. Same is happening when i am trying to open User Page form user management responsibility from inside a form window.Where as it is opening fine from home page.
    Please help.

    Hi, hueesin
    in error log i got this 4 new lines while performing the transaction from my host
    [Thu Dec 30 13:27:39 2010] [error] [client 172.16.6.144] [ecid: 1293695859:172.16.48.61:25634:0:8748,0] Directory index forbidden by rule: /dev02/KMCTEST/apps/apps_st/comn/java/classes/
    [Thu Dec 30 13:27:40 2010] [error] [client 172.16.6.144] [ecid: 1293695860:172.16.48.61:25328:0:8829,0] Directory index forbidden by rule: /dev02/KMCTEST/apps/apps_st/comn/java/classes/
    [Thu Dec 30 13:28:06 2010] [error] [client 172.16.6.144] [ecid: 1293695886:172.16.48.61:25654:0:9225,0] File does not exist: /dev02/KMCTEST/apps/apps_st/comn/java/classes/oracle/forms/engine/RunformBundle_en_IN.class
    [Thu Dec 30 13:28:06 2010] [error] [client 172.16.6.144] [ecid: 1293695886:172.16.48.61:25654:0:9226,0] File does not exist: /dev02/KMCTEST/apps/apps_st/comn/java/classes/oracle/forms/engine/RunformBundle_en_IN.propertieswhile in access log i got
    172.16.6.144 - - [30/Dec/2010:13:32:51 +0530] "POST /OA_HTML/OA.jsp?page=/oracle/apps/fnd/sso/login/webui/MainLoginPG&_ri=0&_ti=587084970&language_code=US&requestUrl=http%3A%2F%2Fkmctapp2.kmc.com%3A8005%2FOA_HTML%2FRF.jsp%3Ffunction_id%3D2014%26resp_id%3D50670%26resp_appl_id%3D7000%26security_group_id%3D0%26lang_code%3DUS%26params%3Df7B5hnH8rkFfR.idy0MT1JZrquJxVBy3CVpSV.GpXc0%26oas%3DAuZa28Bnhl7glqYyqXbjsg..&cancelUrl=http%3A%2F%2Fkmctapp2.kmc.com%3A8005%2FOA_HTML%2FAppsLogin&langCode=US&oapc=2&oas=rucHEnmoEQ25-3xRNnl0ZA.. HTTP/1.1" 302 708 1 "http://kmctapp2.kmc.com:8005/OA_HTML/RF.jsp?function_id=28636&resp_id=-1&resp_appl_id=-1&security_group_id=0&lang_code=US&params=Br702.NFW.nrlg1EodytbsK-Dc1k9ERgGeColziC.cPOIi7hiyjaPiR6AJ7.Lk4IUbiFt8MZ-sww1yPk9nLXIYqdPHfttMeywkt5IQhVsrG8Y9M-0CrrcAU8ZntmtaFjlkc2vXbUaot6TQpdqAPHJyaJn6YLsew516hhfiB2xemOmo6e-.WpPrlXfvBQG.XVr-Z8y-V4uRkwwHgWHTK.ju6jLsF35BmqTRszq39cgoHe38QZqjtonDRWgTFzvxooOAmX1EHPfxfMz88uKnVWnnzU-4996ZD8e3X0Dagp19gjOYgefJlT1fTUaFvMo3cP.-7Ypt0s4Cck.GhdFOnHRK1Ok6KdvnjFyjK-WHCy4ZHCvw3NZPREYBngqJc4gvnDziIu4Yso2j4kegCe-i5OCFG4hbfDGf7MMNcj5PZy1yFwJ8GIMHyNmCAg9Yo1bXn5cTHOy7xYWHyOD5.ax3JG6Q&oas=W0vxAqkroMB_7DgeNPZhYw.." "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"
    172.16.6.144 - - [30/Dec/2010:13:32:51 +0530] "GET /OA_HTML/RF.jsp?function_id=2014&resp_id=50670&resp_appl_id=7000&security_group_id=0&lang_code=US&params=f7B5hnH8rkFfR.idy0MT1JZrquJxVBy3CVpSV.GpXc0&oas=AuZa28Bnhl7glqYyqXbjsg.. HTTP/1.1" 200 7534 0 "http://kmctapp2.kmc.com:8005/OA_HTML/RF.jsp?function_id=28636&resp_id=-1&resp_appl_id=-1&security_group_id=0&lang_code=US&params=Br702.NFW.nrlg1EodytbsK-Dc1k9ERgGeColziC.cPOIi7hiyjaPiR6AJ7.Lk4IUbiFt8MZ-sww1yPk9nLXIYqdPHfttMeywkt5IQhVsrG8Y9M-0CrrcAU8ZntmtaFjlkc2vXbUaot6TQpdqAPHJyaJn6YLsew516hhfiB2xemOmo6e-.WpPrlXfvBQG.XVr-Z8y-V4uRkwwHgWHTK.ju6jLsF35BmqTRszq39cgoHe38QZqjtonDRWgTFzvxooOAmX1EHPfxfMz88uKnVWnnzU-4996ZD8e3X0Dagp19gjOYgefJlT1fTUaFvMo3cP.-7Ypt0s4Cck.GhdFOnHRK1Ok6KdvnjFyjK-WHCy4ZHCvw3NZPREYBngqJc4gvnDziIu4Yso2j4kegCe-i5OCFG4hbfDGf7MMNcj5PZy1yFwJ8GIMHyNmCAg9Yo1bXn5cTHOy7xYWHyOD5.ax3JG6Q&oas=W0vxAqkroMB_7DgeNPZhYw.." "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"
    172.16.6.144 - - [30/Dec/2010:13:32:51 +0530] "GET /OA_HTML/cabo/images/swan/t.gif HTTP/1.1" 304 0 0 "http://kmctapp2.kmc.com:8005/OA_HTML/RF.jsp?function_id=2014&resp_id=50670&resp_appl_id=7000&security_group_id=0&lang_code=US&params=f7B5hnH8rkFfR.idy0MT1JZrquJxVBy3CVpSV.GpXc0&oas=AuZa28Bnhl7glqYyqXbjsg.." "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"
    172.16.6.144 - - [30/Dec/2010:13:32:51 +0530] "GET /OA_HTML/cabo/images/swan/errorl.gif HTTP/1.1" 304 0 0 "http://kmctapp2.kmc.com:8005/OA_HTML/RF.jsp?function_id=2014&resp_id=50670&resp_appl_id=7000&security_group_id=0&lang_code=US&params=f7B5hnH8rkFfR.idy0MT1JZrquJxVBy3CVpSV.GpXc0&oas=AuZa28Bnhl7glqYyqXbjsg.." "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"
    172.16.6.144 - - [30/Dec/2010:13:32:51 +0530] "GET /OA_HTML/cabo/images/swan/navBarUnderTopTabsBg.gif HTTP/1.1" 304 0 0 "http://kmctapp2.kmc.com:8005/OA_HTML/RF.jsp?function_id=2014&resp_id=50670&resp_appl_id=7000&security_group_id=0&lang_code=US&params=f7B5hnH8rkFfR.idy0MT1JZrquJxVBy3CVpSV.GpXc0&oas=AuZa28Bnhl7glqYyqXbjsg.." "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"
    172.16.6.144 - - [30/Dec/2010:13:32:51 +0530] "GET /OA_HTML/cabo/images/swan/footerBg.gif HTTP/1.1" 304 0 0 "http://kmctapp2.kmc.com:8005/OA_HTML/RF.jsp?function_id=2014&resp_id=50670&resp_appl_id=7000&security_group_id=0&lang_code=US&params=f7B5hnH8rkFfR.idy0MT1JZrquJxVBy3CVpSV.GpXc0&oas=AuZa28Bnhl7glqYyqXbjsg.." "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)"

  • Help With Integrating Servlet and JSP Page?

    Hello There
    --i made jsp page that contain name and description fields and add button
    --and i made servlet that contain the code to insert name and description in the database
    --and i want to make that when the user hit the add button
    -->the entered name and description is sent to the servlet
    and the servlet sent them to database?
    here's what i 've done:
    the jsp code:
    <html:html locale="true">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>
            Categories Page
           </title>
            <html:base/>
        </head>
        <body style="background-color: white">
        <form action="jpage.jsp" method="get">
            <h1>
                <center>
    categories Operations
                </center>
            </h1>
            <h3>
                 <label>Name</label>
            <input type="text" name="name" value="" size="10" />
                 <label>Description</label>
             <input type="text" name="description" value="" size="10" />
             <input type="submit" value="Add" name="button" />
           </h3>
       </form>
        </body>
    </html:html>the servlet code:
    import java.io.*;
    import java.util.Enumeration;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.net.*;
    class NewServlet1 extends HttpServlet{
         Connection conn;
         private ServletConfig config;
    public void init(ServletConfig config)
      throws ServletException{
         this.config=config;
    public void service (HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
       HttpSession session = req.getSession(true);
       res.setContentType("text/html");
    try{
         Class.forName("com.mysql.jdbc.Driver");
       conn = DriverManager.getConnection("jdbc:mysql://localhost/struts", "root", "");
         PreparedStatement ps;
       ps = conn.prepareStatement ("INSERT INTO categories (Name, Description) VALUES(?,?)");
          ps.setString (1, "aa");
          ps.setString (3, "bb");
          ps.executeUpdate();
          ps.close();
          conn.close();
      }catch(Exception e){ e.getMessage();}
      public void destroy(){}
    }

    The JSP Code:
    <html:html locale="true">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>
            Categories Page
           </title>
            <html:base/>
        </head>
        <body style="background-color: white">
        <form action="actionServlet.do?action=Additem" method="*post*">
            <h1>
                <center>
    categories Operations
                </center>
            </h1>
            <h3>
                 <label>Name</label>
            <input type="text" name="name" value="" size="10" />
                 <label>Description</label>
             <input type="text" name="description" value="" size="10" />
             <input type="button" value="Submit">
           </h3>
       </form>
        </body>
    </html:html>The Servlet Code:
    import java.io.*;
    import java.util.Enumeration;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.net.*;
    public class NewServlet1 extends HttpServlet implements SingleThreadModel {
        public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException,IOException {
            doPost(request,response);
        public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException,IOException {
              String action = request.getParameter("action"); // action = "Additem"
              if (action.equals("Additem")) {
                   String name = request.getParameter("name");
                   String description = request.getParameter("description");
                         RequestDispatcher reqDisp = null;
                   try{
                  Connection conn;
                  PreparedStatement ps;
         Class.forName("com.mysql.jdbc.Driver");
       conn = DriverManager.getConnection("jdbc:mysql://localhost/struts", "root", "");
       ps = conn.prepareStatement ("INSERT INTO categories (Name, Description) VALUES(?,?)");
          ps.setString (1, name);
          ps.setString (3, description);
          ps.executeUpdate();
          ps.close();
          conn.close();
          reqDisp= request.getRequestDispatcher("./index.jsp");
          reqDisp.forward(request, response);
                   catch (Exception ex){
                        System.out.println("Error: "+ ex);
    }The web.xml code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <servlet>
            <servlet-name>action</servlet-name>
            <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
            <init-param>
                <param-name>config</param-name>
                <param-value>/WEB-INF/struts-config.xml</param-value>
            </init-param>
            <init-param>
                <param-name>debug</param-name>
                <param-value>2</param-value>
            </init-param>
            <init-param>
                <param-name>detail</param-name>
                <param-value>2</param-value>
            </init-param>
            <load-on-startup>2</load-on-startup>
            </servlet>
        <servlet>
            <servlet-name>NewServlet1</servlet-name>
            <servlet-class>NewServlet1</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>action</servlet-name>
            <url-pattern>*.do</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>NewServlet1</servlet-name>
            <url-pattern>/NewServlet1</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
            </welcome-file-list>
            <servlet>
         <servlet-name>actionServlet</servlet-name>
         <servlet-class>com.test.servlet.NewServlet1</servlet-class>
    </servlet>
    <servlet-mapping>
         <servlet-name>actionServlet</servlet-name>
         <url-pattern>*.do</url-pattern>
    </servlet-mapping>
        </web-app>

  • How to display a variable(non editable)  in JSP page?

    I have this java code in my JSP and I want to print it on the JSP page with a name associated to it so that it can be passed to a Java Bean. How can I do it?
    String user = display.getOwnerName();

    whatever value you want to send it to server side, you have to put it in a "form". You can put it in HTML form input tag , JSP form, Struts form or JSF form.
    for example:
    <form action="getUserProfile.do">
    <input type="text" value="<c:out value='display.ownerName' />" />
    </form>
    kind regards

  • Bringing in old user name and info.

    I had a hard drive failure recently but fortunately we were able to save my old user name with all the info.  I had to download and install the new softward.  For whatever reason I can't find a way to open up my old user name in the old software.  Any help you could offer would be great!!!

    The version of Palm desktop you downloaded, is it the same version you used previously?
    If not, what version did you download? If you have the user folder from a version 4.x palm desktop and are now using 6.2, it will not work. You need to use the same version you had installed previously.
    If you have the username folder and want to use that data, you will need to copy and paste the folder into the Palm folder in c-program files-palm or palmone. Open Palm desktop and the data should be there.
    Here is a method for backing up your data for disaster recovery.
    The best way to preserve your data is to export the data in each category in Palm Desktop to a seperate folder on your PC.
    Create a new folder on your PC somewhere that is convenient. Name it something like Palm Desktop Data. Click on the link below and follow the instructions on that page for the export procedure.
    http://www.palm.com/cgi-bin/cso_kbURL.cgi?ID=28734
    Make sure you select all for the range in the export window.
    With the data saved in the folder you created, make a copy of that folder and save to a flash drive, cd-rw or external hard drive.
    Anytime you make a change in Palm Desktop, export the data that was changed to that folder and save again to the external media.
    With this process you can always import the data back into Palm Desktop anytime you have a problem with the data in Palm Desktop or if your computer/hard drive/device crashes.

  • I get a fatal error message, "could not find %APPDATA%\. " when I try to open Firefox under another user . It is fine under the first user. How can I fix this.

    Version is 7.0.1
    Windows 7 64 Bit
    I can open FF under my user name which is not an Administrator,
    but when I try to open it under one of the Administrator names I get that error message. I do have the password for that administrator.

    Upgrade your browser to Fiefox 8 and check
    * getfirefox.com

  • How to display a document content in a JSP page

    Hi friends,
    I am trying to display a document's content in a JSP page after user authentication.For that I mapped a jsp file with extension ".sens" in Content Management SDK manager,and put the file in the directory '/ifs/jsp-bin' of webstarterapp,but it is not working.Please help me to solve the probleb as earliest.
    Regards
    Prasenjit

    under view put a new tag
    <f:view>
    <ui:script url="page.js"/>
    and thats it

Maybe you are looking for

  • Can't use iTunes Store

    I am a new user for the iTunes store although I have an existing AppleID (Mac user since 1987). I attempt to login to the store, my AppleID and password are accepted and I am directed to a "review your information" screen. I enter my credit card numb

  • Process Chain Cancelling in Background Process

    Hello Experts, In our production system Process Chain is canceling in background process. Please tell me the reason and how to solve this issue. Details of Process Chain Background Job 1. BI_PROCESS_TRIGGER Job Step No. Program name/command Prog. typ

  • Conversion of datatypes

    Hi, How to convert a field of type 'date' into 'decimal' on target side in while doing mapping.Anybody Pleaseee..... Thanks & Regards, Radhika.

  • System Requirements for Hardware Encryption on Crucial SEDs

      The majority of current Crucial SSDs are Self-Encrypting Drives (SEDs) which means all data is always encrypted by the controller when written to the NAND and decrypted when read. Windows 8 BitLocker can work with this built-in hardware encryption

  • BC4J , Struts

    i had downloads the new struts 1.1 b3 and replace the original from the jdeveloper 903. i found the following error: java.lang.AbstractMethodError: org.apache.struts.validator.ValidatorPlugIn.init any idea?