Calling an situation-sensetive action in an jsp-file

Hi all,
I have to call an action (kind of: <html:form action="/actions/myInfos/studentListTaskBeurteilungenAction.do" method="POST"> in an jsp file, but I have to give the action two paramters as well I have in this jsp.
I tried things like:
<c:set var="tt" value="${requestScope.info}"/>
<html:form action="/actions/myInfos/studentListTaskBeurteilungenAction.do?studgruppe='<c:out value='${tt[5]}' default='?'/>'&taskgruppe=<c:out value='${tt[6]}' default='?'/>" method="POST">
but there is a problem with the "s and 's , because he doesnt understand, that he has to intepret the commands to get a String out of them but thinks they are already the strings.
Does anybody know, how to solve this problem. (Without Forms if possible, because in the target-action i'm using a different form than in the source-action.
Thank you all
Thomas

<c:ur var="action" value="/actions/myInfos/studentListTaskBeurteilungenAction.do">
  <c:param name="studgruppe" value="${tt[5]}"/>
  <c:param name="taskgruppe" value="${tt[6]}"/>
</c:url>
<html:form action="${action}" method="POST">

Similar Messages

  • Deploying a JSP file

    Hello,
    I am currently trying to deploy a jsp file on the application server from NWDS.
    But unfortunatelly I didn't manage to make it work yet.
    If anybody could provide a step by step howto that would be great, I am not very familiar with the deployment descriptor files for java web applications. So I am having trouble to set the right web project up where I can add my jsp and then deploy and find it on the server.
    My situation is: I have a jsp file from the internet that I would like to deploy on the AS. Afterwards I want to call the jsp directly via the browser. I already have my Web AS setup in NWDS, so I can deploy web projects there.
    I am just not sure, which kind of project to chose and how to integrate my jsp. And afterwards which sub URL to use to call my jsp.
    Any help would be really appreciated!
    Best Regards,
    Peter

    Hello Dibya,
    Thank you for your reply!
    I have actually seen this thread but unfortunatelly I could not make my jsp work.
    One problem I have is that in every guide I found, it says to create a "J2EE -> Web module" project in NWDS. But in my NWDS I only have Application Client-, Connector-, Enterprise Application- and Utility Project under "J2EE". 
    Under "Web" I have "Dynamiy web project" and "Static web project" in addition.
    Which one would be the right one?
    I have also tried to create a portal application project like advised in the mentioned thread.
    Basically what I did so far was creating the mentioned projects, then right click the project and choose new -> jsp file.
    Into the jsp file I then inserted the coding of my downloaded jsp file and then I tried to export the projects into an EAR file.
    This also worked. Then I deployed the EAR archive to the application server. But when I am on the application server I am not able to find / open my appliciation.
    For example the last try I did was with the portal application. I have an EAR file created out of my portal application file. Inside the EAR file there is a WAR file. Inside the WAR file I have a folder called "WEB-INF" and inside this folder there is the "jsp" folder and in there is my jsp.
    My question is now, how can I call that jsp after deploying the EAR file?
    Let's say my project is called "test" and I have a "test.ear", inside of that I have the "test.war" and inside there in the "WEB-INF/jsp" folder I have a "abc.jsp".
    When I open my appserver address http://server:port/test I am getting http error 403:
    Error: You are not authorized to view the content of the requested directory.
    Details:     
    Directory listing is not allowed on this server.
    So I tried to open the jsp via:
    http://server:port/test/abc.jsp
    http://server:port/test/test/
    http://server:port/test/test/WEB-INF/jsp/abc.jsp
    But neither worked (every time http error 404 - file not found).
    So if you could give me any further hint on what I am doing wrong that would be really appreciated.
    Best Regards,
    Peter

  • Accessing parent window form elements from a JSP file

    Actually I have a JSP page . It calls a popup function to load another JSP file on the event Onclick of a label. In the JSP file loaded on the popup window, I need to access the form elements of the parent.
    Eg: the Parent has a Textarea named "ta_1" in the form "appl_1".
    Now i cannot access this element in the child JSP page using,
    window.opener.document.ta_1.appl_1.value;
    The window.opener is not defined for this HTML page cos the HTML page was generated as an output of the JSP file.
    Please give a JSP code snippet which accesses the parent form element..

    Actually I have a JSP page . It calls a popup function to load another JSP file on the event Onclick of a label. In the JSP file loaded on the popup window, I need to access the form elements of the parent.
    Eg: the Parent has a Textarea named "ta_1" in the form "appl_1".
    Now i cannot access this element in the child JSP page using,
    window.opener.document.ta_1.appl_1.value;
    The window.opener is not defined for this HTML page cos the HTML page was generated as an output of the JSP file.
    Please give a JSP code snippet which accesses the parent form element..

  • How to call multiple strus actions froma single jsp

    how to call multiple strus actions froma single jsp, and that actions should be automatically called pls help me
    Thanks in advance

    how to call multiple strus actions froma single jsp, and that actions should be automatically called pls help me
    Thanks in advance

  • How to call a .jsp file from Applet

    Could any one guide me how to call a .jsp file from a Applet using action Event.
    Thanks

    http://javaalmanac.com/cgi-bin/search/find.pl?words=URL+post

  • How to get the action-mapping in jsp page in struts

    Hi,
    I want get, in my login.jsp, the name of action mapping that call my
    login.jsp.
    Is possible?
    suppose abc.do called my login.jsp
    now i need to know the name of action-mapping here abc
    Thanks,

    Depending on what you need, I believe Struts 1.3 creates a request attribute called "org.apache.struts.globals.ORIGINAL_URI_KEY". In your case, it looks like this would be set to the string "/abc.do". There should also be a request attribute called "org.apache.struts.action.mapping.instance" that contains an instance of ActionConfig. I think both of those keys are defined by the Globals class.

  • Calling a cgi script URL in a jsp

              I have a requirement of calling a cgi script URL from a jsp.
              I wish to do the following:
              1. take the parameters from the jsp page,
              2. populate the parameters in the cgi script url,
              3. get results in a java structure
              4. and then paint the gui based on the results.
              Can anyone help me on whether calling a cgi script as above is doable in java?
              An early response would be highly appreciated.
              thanks in advance
              Prashant Gupta
              

    Prashant,
              Yes you should be able to do what you ask (using a JSP to drive a CGI
              script/program) if I understand you correctly. You would gather all the
              parameters in the JSP code and present them to the CGI script/program
              using a FORM with method="POST".
              There is a good example of this in the WebLogic examples. Look for it
              somewhere like:
              C:\bea\wlserver6.1\samples\examples\jsp\tagext\form_validation
              in your installation. However, replace action="successPage.jsp" with
              your CGI script.
              Prashant wrote:
              > I have a requirement of calling a cgi script URL from a jsp.
              > I wish to do the following:
              > 1. take the parameters from the jsp page,
              > 2. populate the parameters in the cgi script url,
              > 3. get results in a java structure
              > 4. and then paint the gui based on the results.
              >
              > Can anyone help me on whether calling a cgi script as above is doable in java?
              > An early response would be highly appreciated.
              > thanks in advance
              > Prashant Gupta
              

  • Calling report with no parameters from a form should report be a JSP file?

    Hi,
    I'm completely new to the Oracle environment and am having a few beginner problems all I want to find out is how to call a report from a form. I know this question has been asked before but I can't work it out from the answers because people seem to keep talking about rdf files:
    I am trying to call the report with the following code:
    Declare
         report_id REPORT_OBJECT;
         v_rep varchar2(100);
         rep_status varchar2(20);
    Begin
         report_id:= FIND_REPORT_OBJECT('EmployeeRep');
         v_rep := RUN_REPORT_OBJECT(report_id);
    END;
    My report is called 'EmployeeRep' but it saves it as a JSP file and there is no option to save as an rdf as is mentioned in other posts. I can understand the environments confusion because there is no directory information with the find_report_object command. Does the report have to be stored in a certain directory.
    All I have done with the report is created it from the emp table of the sample Scott database. Any help is appreciated and nothing is too obvious as I say I'm completely new to this.
    Thanks
    Dan

    Try to pinpoint what is going wrong:
    1. Run the report stand alone (from Reports Builder). If that doesn't work, then it won't work calling it from Forms either.
    2. Check if anything has run at all, or if there are report error messages with:
    http://localhost:port/reports/rwservlet/showjobs?
    For a standalone Report Server use:
    http://localhost:port/reports/rwservlet/showjobs?server=rep_server_name
    3. If it does work, call it from Forms. Is the report output file created (e.g. in the cache directory if destype=cache)? In your code you have run_report_object, but you won't see any output on your screen. To see the output add web.show_document(...) to your report. There are many examples in this forum if you search for run_report_object.

  • How to call a jsp file from an servlet and access the jsp file objects??

    Hi everybody
    I have an jsp file where it contains a vector object with some data and I have a servlet that needs to access this vector object . How can my servlet call for this jsp page and get the vector object. ?
    then an applet will be calling this servlet to get some other object created with the data contained within this vector object...so each time Applet ask the servlet for the object the servlet need to call for this jsp page somehow
    My main question is the communication servlet-jsp
    please if u have any clue I will appreciate it
    thanks

    Hi
    There are several ways to share objects between JSPs/Servlets.
    You can share objects by putting them in the request-in which case the objects lifetime is limited by that of the request, Another way is to store them in the session, againg the lifetime is limited by the lifetime of the session. To have objects that have to persistent over the application life-span use the servletContext to store the objects.
    Any good tutorial should help you get started. Please see the link below for a tutorial on Servlets/JSPs
    Note: Local variables in the JSP cannot be shared with other components as their scope is limited to that particular Page/Servlet.
    Link: http://java.sun.com/docs/books/tutorial/servlets/
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems inc
    http://www.sun.com/developers/support

  • Has anyone gotten the error message after statement of error from Adobe:  Mismatched begin and rollbackUserAction calls? (Import::import action to. generate page bitmap for CONTACT US)

    Help!  Full error statement:
    Adobe Muse CC has encountered an error and will now exit.  Please report the last few actions you took leading up to this error to the Adobe Muse CC team.
    Mismatched begin and rollbackUserAction calls? (Import::import action to. generate page bitmap for CONTACT US)

    Please send us the .muse file and the MuseLog.txt file from your Documents folder to [email protected] Include a link to this thread for context. If the file is larger than 20Mb you can use a service like Adobe SendNow, Dropbox, WeTransfer, etc. (If you use a service, please include your return e-mail address in the body of the message, since not all services include it in the sharing invite they send.) Thanks.

  • Determine the outcome of an action in the jsp page?

    can i determine the outcome of an action in the jsp page?
    for example:
    i create a jsp file that contains two links, that play the role of tabs....
    the action is different for the two links say "action1" and "action2" but the result page is the same original page...
    can i determine what whas the action the user clicked?( so that i can display different things, according to action )

    you can use the <f:param> component with your commandLink and set a different value for each of your link. Then, in your jsp, you should be able to retrieve the value of the parameter in the request.

  • How to call the BPM objects in the child JSP?

    Hi,
    We are facing some problem, we are trying to use the JSP for the UI instead of BPM Presentation.
    In the JSP we are calling the child JSP(using JSP include), we need to pass the BPM objects from child to parent JSP.
    Can any one help me on how to pass the Object between the JSP's and BPM Obejcts.
    I will explain in the Example too,
    1. We are created the BPM objects with fields
    2. Created 2 JSP's 1. Main.JSP 2. Sub.JSP
    Now we need to call the sub.jsp into main.jsp,while we calling we need to pass the sub.jsp BPM Object.
    Regards,
    Anandh P

    Hi
    When you use <% include page="test.jsp" %> you can use the same object's name in child jsp like in parent file (this is static way to include another file).
    Hope this could solve the problem. regards.

  • How to call the Jsp file in JspDynpage

    Hello,
    I am using the following jsp code. I saved it as Thumbnail1.jsp.
    <%@page import ="com.sun.image.codec.jpeg.*" %>
    <%@page import ="java.awt.*" %>
    <%@page import ="java.awt.image.*" %>
    <%@page import ="java.io.*"%>
    <%
        // load image from INFILE
             Image image = Toolkit.getDefaultToolkit().getImage("C:/kasturi/sap1.jpg");
         MediaTracker mediaTracker = new MediaTracker(new Container());
            mediaTracker.addImage(image, 0);
             mediaTracker.waitForID(0);
        // determine thumbnail size from WIDTH and HEIGHT
             int newImageWidth = Integer.parseInt("100");
             int newImageHeight = Integer.parseInt("100");
             double newImageRatio = (double)newImageWidth / (double)newImageHeight;
             int oldImageWidth = image.getWidth(null);
              int oldImageHeight = image.getHeight(null);
              double oldImageRatio = (double)oldImageWidth / (double)oldImageHeight;
              if (newImageRatio > oldImageRatio)
                    newImageWidth = (int)(newImageHeight * oldImageRatio);
          else
              newImageHeight = (int)(newImageWidth / oldImageRatio);
        // draw original image to thumbnail image object and
        // scale it to the new size on-the-fly
             BufferedImage newThumbImage = new BufferedImage(newImageWidth, newImageHeight, BufferedImage.TYPE_INT_RGB);
              Graphics2D graphics2D =newThumbImage.createGraphics();
                 graphics2D.drawImage(image, 0, 0, newImageWidth, newImageHeight, null);
        // save thumbnail image to OUTFILE
               BufferedOutputStream outFile = new BufferedOutputStream(new  FileOutputStream("C:/kasturi/ssa.jpg"));
              JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(outFile);
              JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(newThumbImage);
                encoder.setJPEGEncodeParam(param);
              encoder.encode(newThumbImage);
              outFile.close();
              System.out.println("Successfully Saved.");
    %>
    I want to call this thumnail1.jsp file JspDynpage. Can any help me how to make that?
    Thanks in advance.

    hello,
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="SharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="Test">
          <component-config>
            <property name="ClassName" value="kasturi.Test"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/Thumbnail1.jsp"/>
            <property name="SecurityZone" value="high_safety"/>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services/>
    </application>
    this is my portalapp.xml file. Still i am getting error.
    i don't know the exact error. i think it may be java code problem.
    can you tel me what is that? thanks in advance.
    Message was edited by: kasturi ramalingam

  • Calling a java bean in a jsp file

    hi all
    i am working on a jsp project. my tomcat is installed on one machine and my java Bean on another. how do i call the javabean on my machine from the jsp file on tomcat. i'm using packages.
    eg:
    in the jsp file in tomcat, i'm using
    <jsp:useBean id="student" scope="request" class="lab3.Student"/>
    i get class not found error.
    my main path for this Student Bean is say c://myLab/lab3 which has a lab3 folder with class files.
    Thanks

    eg:
    in the jsp file in tomcat, i'm using
    <jsp:useBean id="student" scope="request"
    class="lab3.Student"/>
    If you have a Context defined for c://mylab
    then below that directory you should have a WEB-INF directory and then a classes directory and then within that your package structure...
    so if the package is lab3 yo should have your Student class in:
    c://mylab/WEB_INF/classes/lab3/Student.class
    (asuming you have set up a Context that points at c://mylab...and your jsp file is there...)

  • Calling JSP files existing in the pagelet/jsp folder of the PAR file

    Hi,
    I have all my JSPs in the Pagelet/JSP folder and am trying to call one from other.
    For example :- There are 2 JSPs, namely, FILE1.jsp and FILE2.jsp. Now when I try to display the first and call the second on clickling a hyper link in the first page dispalyed, i am facing issues.
    I have included a component entry for both the files. Here's the extract :-
    <components>
        <component name="File1">
          <component-config>
            <property name="ClassName" value="com.bp.ngl.gen.File1"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/File1.jsp"/>          
          </component-config>
        </component>
        <component name="File2"> 
          <component-config>
            <property name="ClassName" value="com.bp.ngl.gen.File2"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/File2.jsp"/>          
          </component-config>   
        </component>     
       <component-profile/>
    And i have inlcuded the following code in the first JSP file to call the second JSP file :-
    <%  
         String componentName = componentRequest.getComponentContext().getApplicationName();
         String helpUrl = "/irj/servlet/prt/portal/prtroot/"componentName".File2";
    %>
    <a href="tools" onClick = "return EPCM.doNavigate("<%=helpUrl %>");">click here</a>
    But this gives me a Portal runtime error.
    I tried creating seperate IViews for both of these JSPs?? I am not sure whether it is required to have it that way. Also I am not sure as if we need seperate java files for each of the JSPs that we create.
    Please help me in this.
    Thanks.
    Regards,
    Narahari

    Hi,
    IF you are using EPCF.doNavigate then you should give the iview address as the url. If should be something like this
    <%
    String componentName = componentRequest.getComponentContext().getApplicationName();
    String helpUrl = "ROLES://portal_content/administrator/super_admin/super_admin_role/com.sap.portal.system_administration/com.sap.portal.system_admin_ws/com.sap.portal.support/com.sap.portal.support_desk";
    %>
    <a href="tools" onClick = "return EPCM.doNavigate("<%=helpUrl %>");">click here</a>
    Or as Ranjith said use the href option
    Regards
    Prakash

Maybe you are looking for

  • Install Oracle 8.1.6 (Solaris): show error after runInstaller

    Hello, After entered "runInstaller" on my SunOS 5.6, the following error message appeared "Initializing Java Virtual Machine from <.... a list of library ........> Please wait..." Error in CreateOUIProcess : 14 :Bad Address I've already set ENVIRONME

  • PowerMac 8600/250 LCD connection problem

    I've an 8600/250 with a Sonnet Crescendo G4 processor upgrade; Sonnet Tempo ATA133 card; USB (v.1.1.2) card w/2 HDs--running both the native 4 gb scsi and a Seagate ATA/128 gb drives. It's all connected to a ViewSonic VX-710 15 inch LCD monitor. It i

  • Very slow video streaming.

    This problem started around a week ago. And watching videos being one of the main uses of this Macbook it's quite a frustrating problem. Especially as I don't know what else to do about it. About my Mac: Macbook 6.1 2.26GHz Duo Core 2GB 1067 MHz DDR3

  • Elements 12 is not compatible with newer high definition, high resolution screens.

    After many, many hours of troubleshooting on my own, asking questions and time on the chat, Adobe finally told me that Elements 12 is not compatible with my screen. No apology, no offer of refund, no indication when a fix might be available. 

  • Games on nano

    can i put games on my nano or not because it came with games, so i asumed that i could put more on. But when i bought one, i cant figure out how to install it. HELP!!!!!